Hi, I'm using Word 03.
I have the following macro:
Sub Shade()
Dim tblTable As Table
If ActiveDocument.Tables.Count >= 1 Then
For Each tblTable In ActiveDocument.Tables
tblTable.Rows(1).Shading.BackgroundPatternColor =
wdColorBrightGreen
Next tblTable
End If
End Sub
HOW DO I REFER TO THE LAST ROW IN THE TABLE INSTEAD OF #1? THE LAST ROW'S
INDEX NUMBER CAN VARY. THANKS
You can use the index property of the last row (i.e.
Selection.Tables(1).Rows.Last.Index).
> Hi, I'm using Word 03.
>
[quoted text clipped - 13 lines]
> HOW DO I REFER TO THE LAST ROW IN THE TABLE INSTEAD OF #1? THE LAST ROW'S
> INDEX NUMBER CAN VARY. THANKS
Jay Freedman - 17 Mar 2006 20:08 GMT
You can also use Selection.Tables(1).Rows.Count.

Signature
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.
> You can use the index property of the last row (i.e.
> Selection.Tables(1).Rows.Last.Index).
[quoted text clipped - 16 lines]
>> HOW DO I REFER TO THE LAST ROW IN THE TABLE INSTEAD OF #1? THE
>> LAST ROW'S INDEX NUMBER CAN VARY. THANKS