BookmarkID wrong

S

Smallweed

When I run the following I get a "requested member of the collection does not
exist" error:

If Selection.BookmarkID <> 0 Then
MsgBox ActiveDocument.Bookmarks(Selection.BookmarkID).Name
End If

It's because the id of the bookmark enclosing my cursor happens to be 13 and
yet the ActiveDocument.Bookmarks.Count is only 11.

How can this be??
 

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