View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman
 
Posts: n/a
Default Hyperlinks within document go to wrong place

When you insert a hyperlink to a heading, Word inserts a hidden bookmark
around the heading, with a name like _Ref70769874 (the number is randomly
generated). The hyperlink field then refers to that bookmark. When you click
the link, the cursor goes to the beginning of the bookmark.

In the misbehaving cases, the bookmark must surround some text on the page
before the heading as well as the heading itself. This is usually caused by
having a hard page break before the heading, formatted in the heading style.
That's one of several reasons that hard page breaks are a Bad Idea. Instead,
format the heading (or the heading style) with the Page Break Before
attribute.

To fix the problem, try these steps:

- Right-click a misbehaving hyperlink and select Toggle Field Codes.
- Make a note of the _Ref number in the code.
- Repeat for the other misbehaving hyperlinks.
- Open the Insert Bookmark dialog. Uncheck and recheck the box for "Hidden
bookmarks". All the _Ref names should now appear in the list.
- Find the bookmarks that were referenced by the hyperlinks, select each one
and delete it. (This deletes the bookmark, but not the heading.)
- Either (a) remove the hard page breaks and replace them with Page Break
Before formatting in the headings, or (b) select the hard page breaks and
change their style to Normal.
- Delete and recreate the hyperlinks. They should now behave properly.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Laura79 wrote:
I am using Word 2002 with Windows Me. I have created a large document
which contains many hyperlinks to places in the document. I have used
Word's default Heading Styles. All the hyperlinks were created with
"Insert-Hyperlink-LinkTo:Place in this Document". Almost all the
hyperlinks work correctly, but there are a few that link to the wrong
place in the document. I cannot discover any difference in
formatting. To be more specific: the links that are not working
correctly are supposed to go to headings on separate pages - each
link should go to the beginning of that heading's page; instead,
these links are going to the END of the last heading's page. I have
tried creating Bookmarks and linking to the Bookmark instead of the
heading, but that also takes me to the (same) wrong place. I thought
perhaps the inserted Page Breaks were the problem, so I tried
removing the Page Breaks and putting all these headings on a single
page - but the hyperlinks still go to END of the previous heading,
instead of the beginning of the correct heading. As I said, all the
other hyperlinks to headings in this 160-page document work
correctly. Any ideas on what the problem is, and how to fix it?
Thanks in advance for any help you can offer.