Determine table index

D

Doug Leveille

I have a bookmark in a table. Using VBA, I want to be
able to select that bookmark and then determine what the
table index number is so I can add columns/rows to it.
The gobjword.activedocument.Tables.count seems to return
the total number of tables in the document. Is there a
way to return the index of the table you current are in?

Thanks
 
J

Jezebel

If you just need a reference to the table (eg in order to add columns and
rows), you can use

Set MyTable = MyBookmark.Range.Tables(1)

This returns a reference to the first table within the bookmark range.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top