Hi, Mike,
The tables in your document are numbered in the order
they appear -- their index (when using the Tables
collection object) is their order in the document:
So, for example, if you want to place the text "Word
Tables are Great!" in the cell that sits in the 3rd
column, 4th row of the 2nd table in the document, this
would be the line of code:
ActiveDocument.Tables(2).Rows(4).Cells(3).Range.Text
= "Word Tables are Great!"
Note that, if you have nested tables, or any of the
tables you want to access are not in the main story of
the document (such as in the Header\Footer layer or in a
footnote) ...there's a bit more to it than this ... so
let me know if that's applicable.
If you want to just confirm that Word sees the table you
think is table 3,for example, as table 3 ... run this
line of code:
ActiveDocument.Tables(3).Select
The table Word sees as table 3 will be selected.
Hope that helps!
Stephanie Krieger
author of Microsoft Office Document Designer (from
Microsoft Press)
email: MODD_2003 at msn dot com
blog: arouet.net