Where is hyperlink pointing to?

O

olexij.tkatchenko

Hello,
I have hyperlinks in my document, which are pointing to headings. The
subaddress of a hyperlink looks like "_Section_1". I have expected,
that "_Section_1" is a bookmark in the Active document, but the
ActiveDocument.Bookmarks() list is empty. I would like to know, how can
I find the destination, especially the paragraph the hyperlink is
pointing to.
 
S

Stefan Blom

Bookmarks whose names start with an underscore are hidden. Do the
following to go to a hidden bookmark: In the Bookmark dialog box,
check the option for "Hidden bookmarks." You may have to click the
"Location" button to see the bookmark names. Select the name and click
Go To.
 
O

olexij.tkatchenko

Stefan said:
Bookmarks whose names start with an underscore are hidden. Do the
following to go to a hidden bookmark: In the Bookmark dialog box,
check the option for "Hidden bookmarks." You may have to click the
"Location" button to see the bookmark names. Select the name and click
Go To.

Thank you for the hint! Setting

ActiveDocument.Bookmarks.ShowHidden = True

before using ActiveDocument.Bookmarks solved my problem. The piece of
code I use:

Dim BM As Bookmark
ActiveDocument.Bookmarks.ShowHidden = True

For j = ActiveDocument.Bookmarks.Count To 1 Step -1
Set BM = ActiveDocument.Bookmarks(j)
' do some stuff
Next j
 

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