-1

I have a word document with multiple tables. Within some of the tables, in row 2, column 1, I have multiple bookmarks that include text. I need to find if the bookmark is in a specific table. How do I know what table my bookmark is in? Or can I list the bookmarks within a table's cell. Either one will work.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Denise
  • 11
  • 4

1 Answers1

0

I figured out my answer. I loop through the number of bookmarks within that table.

    ' returns the number of bookmarks in the table
    ltable = ActiveDocument.Tables(i).Range.Bookmarks.Count
    ' place items in table
    For j = 1 To ltable
        On Error GoTo Skip2
        sTemp = ActiveDocument.Tables(i).Range.Bookmarks(j).Name
        sChgStr = ActiveDocument.Bookmarks(sTemp).Range.Text
        If Len(sChgStr) > 0 Then
            sc(1) = ItemNumber(sChgStr, 1)
            sc(2) = RevisionLetter(sChgStr)
            Call FillSummaryTable(sc())
        End If
     ....
Denise
  • 11
  • 4