View Single Post
 
Old 10-07-2019, 03:17 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You can't name the table itself but you can use other methods to identify particular tables.

For instance you can place a bookmark in a table and then use something along the lines of
ActiveDocument.Bookmarks("bmname").Range.Tables(1)

The beauty of using a bookmark is that it can't exist in more than one place so if you copy and paste that table, the copies won't also have the bookmark in them.

You can also iterate through the tables to find each one that matches your pattern. eg
For each aTable in ActiveDocument.Tables
if aTable.Style = "Fred" then 'do something

end if
Next aTable
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote