Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
vba get table's object from bookmark
using VBA;
I have serveral tables in a doc. One of the tables has a bookmark in one of its cells. How can I go from a bookmark to get the table reference the bookmark is in? Better yet would be a cell reference that I could also use to get the table reference. Using doc.Application.Selection.Information(W.WdInformat ion.wdWithInTable) only tells me that the bookmark is in a table, not which table. Thanks |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
vba get table's object from bookmark
[range].Tables(1)
this returns a reference to the table that includes the range. The range can be the selection, or the contents of a cell, or any range at all, eg set pTable = activedocument.Bookmarks("mybm").Range.Tables(1) Be aware that there are complications if you have nested tables. "tack" wrote in message ... using VBA; I have serveral tables in a doc. One of the tables has a bookmark in one of its cells. How can I go from a bookmark to get the table reference the bookmark is in? Better yet would be a cell reference that I could also use to get the table reference. Using doc.Application.Selection.Information(W.WdInformat ion.wdWithInTable) only tells me that the bookmark is in a table, not which table. Thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I group a caption and object (figures and tables)? | Microsoft Word Help | |||
My noteref to valid bookmark says "Error! Bookmark not defined."? | Microsoft Word Help | |||
Insert a bookmark field | Microsoft Word Help | |||
Auto-numbering bug in tables - Word 2003 | Tables | |||
"Word was unable to open the Excel data source" Asp.net Mailmerge | Mailmerge |