Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Last table row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sandy - 17 Mar 2006 18:03 GMT
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
Robert Paulsen - 17 Mar 2006 18:20 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.