Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    179
    Thanks
    3
    Thanked 0 Times in 0 Posts

    How to insert good Hyperlink from Word doc to Middle of target HTML page?

    Hi all,

    I don't know if this is a Word problem or a Windows problem (setting), but I will start here in the Word Processing lounge.

    Brief:
    On my Windows 7 (32-bit) computer, I am trying to insert a hyperlink into a Word 2007 doc to link to an HTML page somewhere in the middle (not at the top of the page). In order to designate a point in the destination HTML page I manually inserted an HTML <a> anchor at my desired target place in the HTML page. Using Word's Insert HyperLink dlg box you can view this anchor in the destination HTML page as a "bookmark".

    Once I have inserted the hyperlink in a Word doc I of course then want to be able click the link to open the HTML page at the bookmark in the middle of the page. However it does not work: it opens the HTML page at the top, rather than at the place of the bookmark in the middle of the page.

    However, this does work on some other Windows/Office configurations
    . Am I missing a Windows/Office setting?

    To read more, see More D
    etail below.

    TIA

    -avraham


    More Detail: These HTML pages are created by Doxygen, an HTML Help generator. By default, it does not create bookmarks that are visible in Word.
    So I manually added a bookmark using the <a> HTML anchor tag

    e.g., <a name="cRecorder_mRecord"></a>

    creates a bookmark named cRecorder_mRecord.

    This bookmark is then visible from Word 2007. You can use the Insert Hyperlink operation to insert a hyperlink to that "bookmark". To see the bookmark click the Bookmark... button.

    However, in my Win7 when I click the link it opens the HTML page at the top, rather than at the place of the bookmark in the middle of the page.

    Now, although this does not work on my Windows 7 (32-bit) computer, this *does* work on my Windows XP, with both Word 2007 and Word 2010; but only if the default browser is IE (not FF or Chrome). Also on a friend's Win 7 64-bit Enterprise computer, this *does* work. But on another friend's PC (also Win 7 64-bit) this does not work.

    And in configurations where this does not work, the bookmark name does not appear in the browser URL line as a URL parameter. If it did, I could write some JScript to pick up the parameter and jump to the right place. (I doubt that the situation is that it is passed - just that it is not visible.)

    Since on Win XP, where the link works with MS IE I see the URL bookmark parameter, but on browsers where it does not work I do not see the URL bookmark parameter, this seems to imply that the browser never received the parameters Ė and that's why the jump does not work. I donít know whether this is because of the browser or a Windows setting or some combo.
    -------

    Another point, the friend for whom this did work on his PC, made a PDF of his Word file and sent it to me. I opened the PDF and clicked the link (same path location on both PCs) and again the same problem: the HTML page opened at the top and not at the bookmark in the middle of the page. At my friend, the PDF's link did work correctly.

    So why does this work on one PC and not another? Is there some Windows or Office setting I am missing?

    Maybe there is another way of making a bookmark in an HTML page that reliably enables opening the page at the bookmark when clicking on a link in Word?



  2. #2
    WS Lounge VIP
    Join Date
    Mar 2006
    Location
    Maryland, USA
    Posts
    690
    Thanks
    17
    Thanked 66 Times in 56 Posts
    When you copy the hyperlink from the hyperlink dialog and paste it onto a Word page, do you see the anchor name (page location)--the #YYYYY (where YYYYY = any text) at the end? If the anchor name isn't there, you must add it. If it is there, paste the link including the anchor name into the browser address box and press enter. Does the link take you to the right location? If the browser does not take you to the right location, the problem may be in Vista.

    I am using W2010 and Windows 7. Location hyperlinks from Word are working fine for me.

    Pam

  3. #3
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    179
    Thanks
    3
    Thanked 0 Times in 0 Posts
    >> PamCaswell: When you copy the hyperlink from the hyperlink dialog and paste it onto a Word page, do you see the anchor name (page location)--the #YYYYY (where YYYYY = any text) at the end? If the anchor name isn't there, you must add it. If it is there, paste the link including the anchor name into the browser address box and press enter. Does the link take you to the right location? If the browser does not take you to the right location, the problem may be in Vista.

    Thanks for the response, Pam.

    >> When you copy the hyperlink from the hyperlink dialog and paste it onto a Word page, do you see the anchor name (page location)--the #YYYYY (where YYYYY = any text) at the end?

    Yes

    >> Does the link take you to the right location?

    Y-e-s-s-s-s!

    Great test idea!

    Just tried it using Chrome. Well, I suppose I have progressed a bit, now. Now we know that my Chrome browser (and I guess also all other browsers) on Win 7 can cope with the bookmark.

    Now why is it that Word cannot transfer the bookmark parameter (#YYYYY) together with the URL address (which in this case is a local HTML page file, for the time being)
    to the browser?

    This works on some other PCs but not on all of them.

    Ideas...?






  4. #4
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    179
    Thanks
    3
    Thanked 0 Times in 0 Posts
    And just to point out again ... the Word link works for friend of mine. So me made a PDF of his Word file. The PDF's link also worked correctly. He sent the PDF to me. I opened the PDF and clicked the link (same path location on both PCs) and again the same problem: the HTML page opened at the top and not at the bookmark in the middle of the page. So the problem is not a Word problem. The problem is somewhere along the interface between the document (Word or PDF) through Windows to the browser.

    -avraham


  5. #5
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Cross-posted at: http://answers.microsoft.com/en-us/o...3-841cb82ca85d

    For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  6. #6
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    179
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Ok - I stand corrected.

    When I am searching for answers I see lots of cross-posts, but I guess those were from an older time when there was't yet an etiquette standard committee.


    I will read the rules and next time try to follow them.


    -avrahm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •