Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Hyperlinks within document go to wrong place
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 Words 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 headings page; instead, these links are going to the END of the last headings 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. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Hyperlinks within document go to wrong place
Thanks for the quick response!
I tried right-clicking on the hyperlink, but that did not give me the "Toggle Field Codes" option you mentioned. So, I looked at all the hidden bookmarks -- which are given as the heading names (not with _Ref####), except for the TOC ones. There are several versions for each heading (not sure why). Following your steps, I tried deleting one of the misbehaving hyperlink bookmarks. I then set up a new heading style to include the 'Page Break Before' formatting (don't want to change all headings at that level to Page Break Before - just these few). Then deleted the existing hyperlink and tried to recreate a hyperlink -- but the new heading style does not show up on the list of "Place in this Document" on the Insert-Hyperlink-LinkTo menu. (The previous hard page break style was already "Normal".) Is there another way to find that "Toggle Field Codes" to identify the correct hidden bookmarks? What am I doing wrong? Thanks for your help. "Jay Freedman" wrote: 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. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Hyperlinks within document go to wrong place
Hi Laura,
Sorry, the mistake was mine -- I assumed that the Insert Hyperlink worked the same way as Insert Reference Cross-reference with the "create as hyperlink" option turned on, but I should have tested first. The Insert Hyperlink command does create hidden bookmarks, but they're named with what you see in the dialog instead of _Ref####. To see the code of a Hyperlink field, as opposed to the Ref field created by the Cross-reference command, place the cursor on the hyperlink and press Shift+F9. (This is just a difference in the context menus between hyperlink fields and other kinds of fields.) After experimenting a bit with both commands, I found that only Word's built-in headings will appear in either dialog to let you select a destination. If you create another style based on a built-in style, the dialogs won't pick it up, even though they have the same outline level. :-( I think the best you can do is to leave the headings in the original style ("Heading 1" or whatever) and manually add the Page Break Before formatting to the specific headings that need it. Delete the manual page breaks. Then test the existing hyperlinks -- you may not have to delete the existing bookmarks or recreate the hyperlinks. That seemed to work for me. -- 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: Thanks for the quick response! I tried right-clicking on the hyperlink, but that did not give me the "Toggle Field Codes" option you mentioned. So, I looked at all the hidden bookmarks -- which are given as the heading names (not with _Ref####), except for the TOC ones. There are several versions for each heading (not sure why). Following your steps, I tried deleting one of the misbehaving hyperlink bookmarks. I then set up a new heading style to include the 'Page Break Before' formatting (don't want to change all headings at that level to Page Break Before - just these few). Then deleted the existing hyperlink and tried to recreate a hyperlink -- but the new heading style does not show up on the list of "Place in this Document" on the Insert-Hyperlink-LinkTo menu. (The previous hard page break style was already "Normal".) Is there another way to find that "Toggle Field Codes" to identify the correct hidden bookmarks? What am I doing wrong? Thanks for your help. "Jay Freedman" wrote: 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. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Hyperlinks within document go to wrong place
Hi Jay -
Thank you very much for your time in testing and responding. In trying to "manually add the Page Break Before formatting to the specific headings that need it," I discovered that Word will not allow me to modify the style of an individual heading -- if I modify the style of that heading, the formatting change applies to all headings of that level in the whole document, which will not work for what I'm doing. So, I found a (very ugly) workaround. I deleted the manual page breaks (I figured from the outset that they were the culprit), as you suggested. Then I just kept hitting Enter (blank paragraphs) until the next heading landed on a new page. This, of course, will not hold up if anyone changes the margins or other formatting. But it does fix the hyperlink problem -- those hyperlinks are now going to the correct location in the document. I do not know how those multiple 'carriage returns' will translate when this document is posted to the website for which it is intended. Thank you again for your help. ======================= "Jay Freedman" wrote: Hi Laura, Sorry, the mistake was mine -- I assumed that the Insert Hyperlink worked the same way as Insert Reference Cross-reference with the "create as hyperlink" option turned on, but I should have tested first. The Insert Hyperlink command does create hidden bookmarks, but they're named with what you see in the dialog instead of _Ref####. To see the code of a Hyperlink field, as opposed to the Ref field created by the Cross-reference command, place the cursor on the hyperlink and press Shift+F9. (This is just a difference in the context menus between hyperlink fields and other kinds of fields.) After experimenting a bit with both commands, I found that only Word's built-in headings will appear in either dialog to let you select a destination. If you create another style based on a built-in style, the dialogs won't pick it up, even though they have the same outline level. :-( I think the best you can do is to leave the headings in the original style ("Heading 1" or whatever) and manually add the Page Break Before formatting to the specific headings that need it. Delete the manual page breaks. Then test the existing hyperlinks -- you may not have to delete the existing bookmarks or recreate the hyperlinks. That seemed to work for me. -- 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: Thanks for the quick response! I tried right-clicking on the hyperlink, but that did not give me the "Toggle Field Codes" option you mentioned. So, I looked at all the hidden bookmarks -- which are given as the heading names (not with _Ref####), except for the TOC ones. There are several versions for each heading (not sure why). Following your steps, I tried deleting one of the misbehaving hyperlink bookmarks. I then set up a new heading style to include the 'Page Break Before' formatting (don't want to change all headings at that level to Page Break Before - just these few). Then deleted the existing hyperlink and tried to recreate a hyperlink -- but the new heading style does not show up on the list of "Place in this Document" on the Insert-Hyperlink-LinkTo menu. (The previous hard page break style was already "Normal".) Is there another way to find that "Toggle Field Codes" to identify the correct hidden bookmarks? What am I doing wrong? Thanks for your help. ================================================== = "Jay Freedman" wrote: 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. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Hyperlinks within document go to wrong place
As you say, this is a very ugly workaround. If applying the "Page break
before" property to the paragraph in question changes the style, then it's possible that "Automatically update" is enabled for that style, and this is something you can change. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Laura79" wrote in message ... Hi Jay - Thank you very much for your time in testing and responding. In trying to "manually add the Page Break Before formatting to the specific headings that need it," I discovered that Word will not allow me to modify the style of an individual heading -- if I modify the style of that heading, the formatting change applies to all headings of that level in the whole document, which will not work for what I'm doing. So, I found a (very ugly) workaround. I deleted the manual page breaks (I figured from the outset that they were the culprit), as you suggested. Then I just kept hitting Enter (blank paragraphs) until the next heading landed on a new page. This, of course, will not hold up if anyone changes the margins or other formatting. But it does fix the hyperlink problem -- those hyperlinks are now going to the correct location in the document. I do not know how those multiple 'carriage returns' will translate when this document is posted to the website for which it is intended. Thank you again for your help. ======================= "Jay Freedman" wrote: Hi Laura, Sorry, the mistake was mine -- I assumed that the Insert Hyperlink worked the same way as Insert Reference Cross-reference with the "create as hyperlink" option turned on, but I should have tested first. The Insert Hyperlink command does create hidden bookmarks, but they're named with what you see in the dialog instead of _Ref####. To see the code of a Hyperlink field, as opposed to the Ref field created by the Cross-reference command, place the cursor on the hyperlink and press Shift+F9. (This is just a difference in the context menus between hyperlink fields and other kinds of fields.) After experimenting a bit with both commands, I found that only Word's built-in headings will appear in either dialog to let you select a destination. If you create another style based on a built-in style, the dialogs won't pick it up, even though they have the same outline level. :-( I think the best you can do is to leave the headings in the original style ("Heading 1" or whatever) and manually add the Page Break Before formatting to the specific headings that need it. Delete the manual page breaks. Then test the existing hyperlinks -- you may not have to delete the existing bookmarks or recreate the hyperlinks. That seemed to work for me. -- 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: Thanks for the quick response! I tried right-clicking on the hyperlink, but that did not give me the "Toggle Field Codes" option you mentioned. So, I looked at all the hidden bookmarks -- which are given as the heading names (not with _Ref####), except for the TOC ones. There are several versions for each heading (not sure why). Following your steps, I tried deleting one of the misbehaving hyperlink bookmarks. I then set up a new heading style to include the 'Page Break Before' formatting (don't want to change all headings at that level to Page Break Before - just these few). Then deleted the existing hyperlink and tried to recreate a hyperlink -- but the new heading style does not show up on the list of "Place in this Document" on the Insert-Hyperlink-LinkTo menu. (The previous hard page break style was already "Normal".) Is there another way to find that "Toggle Field Codes" to identify the correct hidden bookmarks? What am I doing wrong? Thanks for your help. ================================================== = "Jay Freedman" wrote: 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. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Hyperlinks within document go to wrong place
Noooo!!!!! Wrong way!! Those multiple carriage returns will come back
to bite you again and again. Any time you edit anything in the text before that point, you'll get unwanted white space at the top of the page or the heading moving back to the previous page, repeated for every heading you've treated this way. Don't do it! When I said to "manually add the Page Break Before formatting to the specific headings that need it," I meant to put the cursor in the specific heading paragraph, go to Format Paragraph, and check the Page Break Before box. This does *not* affect the heading style, which you specifically do not want to do. (Although if changing it in one heading does affect the style and change all the other headings, you have a different problem -- see http://www.word.mvps.org/FAQs/Format...eformatted.htm.) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org On Wed, 26 Apr 2006 14:08:02 -0700, Laura79 wrote: Hi Jay - Thank you very much for your time in testing and responding. In trying to "manually add the Page Break Before formatting to the specific headings that need it," I discovered that Word will not allow me to modify the style of an individual heading -- if I modify the style of that heading, the formatting change applies to all headings of that level in the whole document, which will not work for what I'm doing. So, I found a (very ugly) workaround. I deleted the manual page breaks (I figured from the outset that they were the culprit), as you suggested. Then I just kept hitting Enter (blank paragraphs) until the next heading landed on a new page. This, of course, will not hold up if anyone changes the margins or other formatting. But it does fix the hyperlink problem -- those hyperlinks are now going to the correct location in the document. I do not know how those multiple 'carriage returns' will translate when this document is posted to the website for which it is intended. Thank you again for your help. ======================= "Jay Freedman" wrote: Hi Laura, Sorry, the mistake was mine -- I assumed that the Insert Hyperlink worked the same way as Insert Reference Cross-reference with the "create as hyperlink" option turned on, but I should have tested first. The Insert Hyperlink command does create hidden bookmarks, but they're named with what you see in the dialog instead of _Ref####. To see the code of a Hyperlink field, as opposed to the Ref field created by the Cross-reference command, place the cursor on the hyperlink and press Shift+F9. (This is just a difference in the context menus between hyperlink fields and other kinds of fields.) After experimenting a bit with both commands, I found that only Word's built-in headings will appear in either dialog to let you select a destination. If you create another style based on a built-in style, the dialogs won't pick it up, even though they have the same outline level. :-( I think the best you can do is to leave the headings in the original style ("Heading 1" or whatever) and manually add the Page Break Before formatting to the specific headings that need it. Delete the manual page breaks. Then test the existing hyperlinks -- you may not have to delete the existing bookmarks or recreate the hyperlinks. That seemed to work for me. -- 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: Thanks for the quick response! I tried right-clicking on the hyperlink, but that did not give me the "Toggle Field Codes" option you mentioned. So, I looked at all the hidden bookmarks -- which are given as the heading names (not with _Ref####), except for the TOC ones. There are several versions for each heading (not sure why). Following your steps, I tried deleting one of the misbehaving hyperlink bookmarks. I then set up a new heading style to include the 'Page Break Before' formatting (don't want to change all headings at that level to Page Break Before - just these few). Then deleted the existing hyperlink and tried to recreate a hyperlink -- but the new heading style does not show up on the list of "Place in this Document" on the Insert-Hyperlink-LinkTo menu. (The previous hard page break style was already "Normal".) Is there another way to find that "Toggle Field Codes" to identify the correct hidden bookmarks? What am I doing wrong? Thanks for your help. ================================================== = "Jay Freedman" wrote: 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. -- 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. |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Hyperlinks within document go to wrong place
Suzanne and Jay -
Thank you for your responses - and your patience. I did (always) make sure "Automatically Update" was unchecked when modifying any formatting style - thanks. I did take out all the 'carriage returns' (even though each of these headings was for a blank page, I knew that workaround would probably create problems at some point). I did manually insert the Format Paragraph Page Break Before. Now the page breaks are where they're supposed to be. And the hyperlinks go where they're supposed to go. Everything is good! Thank you so much for your help!! "Jay Freedman" wrote: Noooo!!!!! Wrong way!! Those multiple carriage returns will come back to bite you again and again. Any time you edit anything in the text before that point, you'll get unwanted white space at the top of the page or the heading moving back to the previous page, repeated for every heading you've treated this way. Don't do it! When I said to "manually add the Page Break Before formatting to the specific headings that need it," I meant to put the cursor in the specific heading paragraph, go to Format Paragraph, and check the Page Break Before box. This does *not* affect the heading style, which you specifically do not want to do. (Although if changing it in one heading does affect the style and change all the other headings, you have a different problem -- see http://www.word.mvps.org/FAQs/Format...eformatted.htm.) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org On Wed, 26 Apr 2006 14:08:02 -0700, Laura79 wrote: Hi Jay - Thank you very much for your time in testing and responding. In trying to "manually add the Page Break Before formatting to the specific headings that need it," I discovered that Word will not allow me to modify the style of an individual heading -- if I modify the style of that heading, the formatting change applies to all headings of that level in the whole document, which will not work for what I'm doing. So, I found a (very ugly) workaround. I deleted the manual page breaks (I figured from the outset that they were the culprit), as you suggested. Then I just kept hitting Enter (blank paragraphs) until the next heading landed on a new page. This, of course, will not hold up if anyone changes the margins or other formatting. But it does fix the hyperlink problem -- those hyperlinks are now going to the correct location in the document. I do not know how those multiple 'carriage returns' will translate when this document is posted to the website for which it is intended. Thank you again for your help. ======================= "Jay Freedman" wrote: Hi Laura, Sorry, the mistake was mine -- I assumed that the Insert Hyperlink worked the same way as Insert Reference Cross-reference with the "create as hyperlink" option turned on, but I should have tested first. The Insert Hyperlink command does create hidden bookmarks, but they're named with what you see in the dialog instead of _Ref####. To see the code of a Hyperlink field, as opposed to the Ref field created by the Cross-reference command, place the cursor on the hyperlink and press Shift+F9. (This is just a difference in the context menus between hyperlink fields and other kinds of fields.) After experimenting a bit with both commands, I found that only Word's built-in headings will appear in either dialog to let you select a destination. If you create another style based on a built-in style, the dialogs won't pick it up, even though they have the same outline level. :-( I think the best you can do is to leave the headings in the original style ("Heading 1" or whatever) and manually add the Page Break Before formatting to the specific headings that need it. Delete the manual page breaks. Then test the existing hyperlinks -- you may not have to delete the existing bookmarks or recreate the hyperlinks. That seemed to work for me. -- 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: Thanks for the quick response! I tried right-clicking on the hyperlink, but that did not give me the "Toggle Field Codes" option you mentioned. So, I looked at all the hidden bookmarks -- which are given as the heading names (not with _Ref####), except for the TOC ones. There are several versions for each heading (not sure why). Following your steps, I tried deleting one of the misbehaving hyperlink bookmarks. I then set up a new heading style to include the 'Page Break Before' formatting (don't want to change all headings at that level to Page Break Before - just these few). Then deleted the existing hyperlink and tried to recreate a hyperlink -- but the new heading style does not show up on the list of "Place in this Document" on the Insert-Hyperlink-LinkTo menu. (The previous hard page break style was already "Normal".) Is there another way to find that "Toggle Field Codes" to identify the correct hidden bookmarks? What am I doing wrong? Thanks for your help. ================================================== = "Jay Freedman" wrote: 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. -- 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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 2003 | Microsoft Word Help | |||
Hyperlink to 'place in this document, headings' goes to wrong plac | Microsoft Word Help | |||
word document with wrong encoding | Microsoft Word Help | |||
PDF hyperlinks when created from a Word document | Microsoft Word Help | |||
Hyperlinks in a protected document | Microsoft Word Help |