Getting hyperlink with # tag in Word to go to named anchor in web page

L

Larry

In Word 97, if I have a plain text url,

http://www.myblog.com/archives/01.html

and press Enter following the url, it turns into an active hyperlink.

But if I have a url that includes the # tag that points to a named anchor in
the target web page, like this,

http://www.myblog.com/archives/01.html#answer

and press Enter, it turns into a hyperlink, but the hyperlink does not go to
the named anchor, it only goes to the top of the web page.

Even if I insert the hyperlink into text in the Word document by using the
Edit Hyperlink dialog box to create a link that includes the # tag, once the
link is created, it only goes to the top of the web page. If I hover the
pointer over the link, the bubble shows the url without the # tag. If I view
the Field Codes (Alt+F9), the codes do display the # tag. Yet the # tag
doesn't work.

So, how do I get a hyperlink in a Word document to go to the named anchor in
a web page?

Thanks.
Larry
 
J

Jay Freedman

In Word 97, if I have a plain text url,

http://www.myblog.com/archives/01.html

and press Enter following the url, it turns into an active hyperlink.

But if I have a url that includes the # tag that points to a named anchor in
the target web page, like this,

http://www.myblog.com/archives/01.html#answer

and press Enter, it turns into a hyperlink, but the hyperlink does not go to
the named anchor, it only goes to the top of the web page.

Even if I insert the hyperlink into text in the Word document by using the
Edit Hyperlink dialog box to create a link that includes the # tag, once the
link is created, it only goes to the top of the web page. If I hover the
pointer over the link, the bubble shows the url without the # tag. If I view
the Field Codes (Alt+F9), the codes do display the # tag. Yet the # tag
doesn't work.

So, how do I get a hyperlink in a Word document to go to the named anchor in
a web page?

Thanks.
Larry

Word doesn't use the # syntax. Instead, it uses an \l switch (that's a lower
case L after the backslash) followed by the anchor name, as in

{HYPERLINK "http://www.myblog.com/archives/01.html" \l "answer"}
 

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