0

I have a bookmark placed inside a rectangle shape in a Word document. I then want to navigate to that bookmark, so that I can update the text inside the rectangle.

I use this code to navigate to the bookmark. This works well when bookmarks are inside other non-text areas, such as tables and charts:

Dim wrdApp As Word.Application
wrdApp.Selection.GoTo What:=wdGoToBookmark, Name:="RectangleBookmarkName"

Unfortunately, I get the error "Word cannot find the requested bookmark".

Any ideas about why this bookmarking technique doesn't appear to work with shapes? Or am I missing something?

(I can navigate to the bookmark manually through the Word bookmarks interface, so the bookmark is definitely there)

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Proposition Joe
  • 481
  • 4
  • 8
  • 22

1 Answers1

1

You can use:

ActiveDocument.Bookmarks("RectangleBookmarkName").Select
Tim Williams
  • 154,628
  • 8
  • 97
  • 125