Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

External HTML hyperlinks to Word

Status
Not open for further replies.

AndoSam

Technical User
Jul 14, 2010
16
GB
Hi

Bit of a cross-topic post but hey, hopefully you might be able to help.
I am trying to create hyperlinks on a webpage to specific bookmarks in a Word document. I have created the bookmark etc. and use the HTML syntax for hyperlinks

Code:
   <a href = \mydocuments\myDoc.doc#my_bookmark>[i]My hyperlink[/i]></a>

When I click on the hyperlink it opens the document so I knowe the path etc. is correct but it does not jump to the bookmark so I think I've got the syntax wrong (although this seems to be what is suggested).

Any thoughts?

Thanks in advance
 
Two different beasties. Different syntax. Word can hyperlink to a Word bookmark in another document. It is a field code.

{ HYPERLINK "C:\\Emphasis.doc" \l "Emphatically" }

This is a hyperlink to the bookmark "Emphatically" in the document "C:\Emphasis.doc.

While Word can hyperlink to a webpage, using the # syntax to go a HTML bookmark (as it is really just part of the Address), AFAIK it is not part of HTML syntax to go the other way. However, my HTML is so rusty it sank.

I took a look at the Microsoft support for this issue, but got confused. I have no idea what they mean by:

<a href="file://<I BRACKET="YES">computer_name</I>/<I BRACKET="YES">share</I>/<I BRACKET="YES">file_name.doc</I>#<I BRACKET="YES">bookmark_name</I>">My Hyperlink</a>

What is with the <I BRACKET="YES"> stuff?????



Gerry

Och ammmmm, I think I need a shave.
- hirsute Scot, trying to decide
 
I found that microsoft syntax as well, makes absolutely no sense to me.
I finally managed to get something vaguely close to working by adding all my bookamrks to the Word document, saving it as a Word HTML document which it appears you can link to using the #<bookmark_name> syntax.

Thanks for your help
 
saving it as a Word HTML document "

Well yes of course, because it is no longer a Word document, it is a normal HTML file.

Gerry

Och ammmmm, I think I need a shave.
- hirsute Scot, trying to decide
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top