If you call the Table.Rows.Add method and you don't supply a value for
the optional BeforeRow parameter, the new row will be added after the
last row.
To prove it to yourself, run this code in a document that contains at
least one table:
Sub Test()
Dim nRow As Row
With ActiveDocument.Tables(1)
Set nRow = .Rows.Add
If nRow.Index <> .Rows.Count Then
MsgBox "Not the last row"
End If
End With
End Sub
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
>Hello,
>
>Now, I know how to add a row in a Word table. But I need to make sure that
>this row will be added after the last row of the table. How can I do that
>with VBA?
>Thanks for your help.
Newbie - 29 Oct 2006 19:18 GMT
Thanks again Jay!
> If you call the Table.Rows.Add method and you don't supply a value for
> the optional BeforeRow parameter, the new row will be added after the
[quoted text clipped - 26 lines]
> >with VBA?
> >Thanks for your help.