Board index » delphi » Delphi 4 and Word 97 tables

Delphi 4 and Word 97 tables

Hi

I create tables in Delphi code ( examples 4 rows and 4 columns). How I
can insert more rows after the last row?

Thanks any help

 

Re:Delphi 4 and Word 97 tables


<<Janne:
How I can insert more rows after the last row?

Quote

var
  T: Table;
  BeforeRow: OleVariant;
begin
  T := Doc.Tables.Add(Word.Selection.Range, 5, 3);
...
  BeforeRow := T.Rows.Last;
  T.Rows.Add(BeforeRow);

--
Deborah Pate

Re:Delphi 4 and Word 97 tables


<<Deborah Pate:
T.Rows.Add(BeforeRow);

Quote

Oops, sorry, read your post too quickly. To
add rows *after* the last you just use
EmptyParam as the parameter,
T.Rows.Add(EmptyParam );

--
Deborah Pate

Other Threads