Microsoft KB Archive/310520

= How to create a hyperlink from an HTML page to a bookmark in Word =

Article ID: 310520

Article Last Modified on 7/27/2006

-

APPLIES TO


 * Microsoft Word 2002 Standard Edition
 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q310520



IN THIS TASK

 * SUMMARY
 * Create a Bookmark in Your Word Document
 * Show the Bookmarks in Your Word Document
 * Create a Hyperlink in a Web Page
 * Method 1: Create the Hyperlink in Word
 * Method 2: Create the Hyperlink in FrontPage
 * Method 3: Create the Hyperlink in Another HTML Editor
 * Troubleshooting
 * REFERENCES



SUMMARY
This article provides a step-by-step guide to creating a hyperlink in a Hypertext Markup Language (HTML) page to a bookmark in a Microsoft Word document.

A bookmark identifies a location or selection of text that you name and identify for future reference. A bookmark in a Word document can be used as a destination for a hyperlink in a Web page. When you click the hyperlink in the Web page, the Word document opens in your Web browser at the location that is specified by the bookmark.

back to the top

Create a Bookmark in Your Word Document
To add a bookmark to a Word document, follow these steps:
 * 1) Start Word, and then open the document to which you want to add a bookmark.
 * 2) Select the item to which you want to assign a bookmark or click the location in your document where you want to insert a bookmark.
 * 3) On the Insert menu, click Bookmark.
 * 4) In the Bookmark_name box, type a name for the bookmark.

Bookmark names must begin with a letter and can contain numbers. You cannot use spaces, but you can use the underscore character (_) to separate words.
 * 1) Click Add.

back to the top

Show the Bookmarks in Your Word Document

 * 1) Start Word, and then open the document that contains the bookmarks that you want to display.
 * 2) On the Tools menu, click Options, and then click the View tab.
 * 3) Click to select the Bookmarks check box.

If you assign a bookmark to an item, the bookmark is displayed as brackets in your document. If you assign a bookmark to a location, the bookmark is displayed as an I-beam.

back to the top

Create a Hyperlink in a Web Page
Use any of the following methods to create a hyperlink that links to a bookmark in a Word document.

back to the top

Method 1: Create the Hyperlink in Word
If you want to use Word as the HTML editor in which to create the hyperlink, follow these steps:
 * 1) Start Word, and then open the Web page in which you want to create a hyperlink. (Click Open on the File menu, locate the Web page, and then click Open.)
 * 2) Select the text or object in which you want to create a hyperlink or click the location on the page where you want to insert the hyperlink.
 * 3) On the Insert menu, click Hyperlink.
 * 4) Under Link to in the Insert Hyperlink dialog box that appears, click Existing File or Web Page.
 * 5) Locate and select the Word document that contains the bookmarks that you want to link to.

The path and file name of Word document are displayed in the Address box.
 * 1) Click Bookmark.

The bookmarks in the Word document that you selected in step 5 are listed in the Select Place in Document dialog box that appears.
 * 1) Click the bookmark that you want as the destination for your hyperlink, and then click OK.

Note that Word appends #  to the end of the path and file name that are displayed in the Address bar.
 * 1) In the Text to display box, type the text that you want to display for the hyperlink.
 * 2) If you want to modify the ScreenTip for your hyperlink, click ScreenTip, type the text that you want the ScreenTip to display, and then click OK.

By default, Word uses the path to the file, including the bookmark name, as the ScreenTip.
 * 1) Click OK.
 * 2) Click Save on the File menu to save your Web page.
 * 3) Click Web Page Preview on the File menu to preview your Web page in a browser.

back to the top

Method 2: Create the Hyperlink in Microsoft FrontPage
If you want to use FrontPage as the HTML editor in which to create the hyperlink, follow these steps:  Start FrontPage, and then open the Web page in which you want to create a hyperlink. (Click Open on the File menu, locate the Web page, and then click Open.) In Page view, do one of the following:  Type the text that you want to use as a hyperlink, and then select it.

-or- Position the insertion point where you want to insert the hyperlink, if you want to use the location as the hyperlink text. For example, you can use a hyperlink text in the following form:

file:// / /

  On the Insert menu, click Hyperlink.  Proceed to one of the following two methods, as appropriate to your version of FrontPage.

Microsoft FrontPage 2000
<ol style="list-style-type: lower-alpha;"> Click the Make a hyperlink to a file on your computer button that is to the right of the URL box.</li> In the Select File dialog box, locate and then click the Word document that you want, and then click OK.</li> Right-click the hyperlink, and then click Hyperlink Properties.

The path and file name of the Word document is displayed in the URL box.</li> Position the insertion point at the end of the path and filename that is displayed in the URL box, and then type the following line:

#

where  is the name of the bookmark in the Word document to which you want to link.

Make sure there is no space between the end of the file name and the bookmark name, for example:

file:// / / #

</li> Click OK.</li> Click Save on the File menu to save your Web page.</li> Click Preview in Browser on the File menu to preview your Web page in a browser.</li></ol>

Microsoft FrontPage 2002
<ol style="list-style-type: lower-alpha;"> Under Link to in the Insert Hyperlink dialog box that appears, click Existing File or Web Page.</li> Locate and select the Word document that contains the bookmarks to which you want to link.

The path and file name of Word document are displayed in the Address box.</li> Position the insertion point at the end of the path and file name that is displayed in the Address bar, and then type the following line:

#

where  is the name of the bookmark in the Word document to which you want to link.

Make sure there is no space between the end of the file name and the bookmark name, for example:

file:// / / #

</li> If you want to modify the text that you want to display for the hyperlink, type the text that you want in the Text to display box.</li> If you want to add a ScreenTip to the hyperlink, click ScreenTip, then type the text that you want the ScreenTip to display, and then click OK.</li> Click OK.</li> Click Save on the File menu to save your Web page.</li> Click Preview in Browser on the File menu to preview your Web page in a browser.</li></ol> </li></ol>

back to the top

Method 3: Create the Hyperlink in Another HTML Editor
If you use an HTML editor other than Word or FrontPage, create the hyperlink, and then type the following line at the end of the path and file name of the Word document to which your hyperlink points:

#

where  is the name of the bookmark in the Word document to which you want to link.

Make sure that there is no space between the end of the file name and the bookmark name.

For example, the hyperlink in your Web page may be represented in HTML as follows <a href=&quot;file://<I BRACKET=&quot;YES&quot;>computer_name</I>/<I BRACKET=&quot;YES&quot;>share</I>/<I BRACKET=&quot;YES&quot;>file_name.doc</I>#<I BRACKET=&quot;YES&quot;>bookmark_name</I>&quot;>My Hyperlink</a> where file:// / / is the path and file name of the Word document, and   is the name of the bookmark in the Word document to which you want to link.

back to the top

Troubleshooting
With Word 2000, your browser may not display the Word document correctly when you click a hyperlink on a Web page that points to a bookmark. For additional information about this issue, click the article numbers below to view the articles in the Microsoft Knowledge Base:

211222 WD2000: Hyperlink to Bookmark in Word Document Fails Using Browser

224672 WD2000: Hyperlink to Anchor or Bookmark Goes to Top of Document

back to the top

<div class="references_section">