Hi,
I have this code that I use to find a table using a Word bookmark. Now I need the same function but without having a Word bookmark, but a piece of text, ie [Start].
Can you help me, please?
builder.MoveToBookmark(bookmark)
Dim sCell = DirectCast(builder.CurrentNode.GetAncestor(NodeType.Cell), Tables.Cell)
Dim sTable = DirectCast(sCell.GetAncestor(NodeType.Table), Tables.Table)
Dim sect = DirectCast(sTable.GetAncestor(NodeType.Section), Section)
Dim sRow = DirectCast(sCell.GetAncestor(NodeType.Row), Tables.Row)
sectIndex = word.Sections.IndexOf(sect)
tableIndex = word.Sections(sectIndex).Body.Tables.IndexOf(sTable)
rowIndex = sTable.IndexOf(sRow)
cellIndex = sRow.IndexOf(sCell)