Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Word
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Field codes: Hyperlink field
 

{ HYPERLINK "Filename" [Switches ] }

A hyperlink (hyperlink: Colored and underlined text or a graphic that you click to go to a file, a location in a file, a Web page on the World Wide Web, or a Web page on an intranet. Hyperlinks can also go to newsgroups and to Gopher, Telnet, and FTP sites.) is a "hot spot" that allows you to jump to another location. The location can include another file on your hard disk or company's network (such as a Microsoft Word document or a Microsoft Excel worksheet), an Internet address (such as http://www.microsoft.com), or a location such as a bookmark (bookmark: A location or selection of text in a file that you name for reference purposes. Bookmarks identify a location within your file that you can later refer or link to.) or slide. The field includes display text, which is often blue and underlined, that the user clicks to jump to the specified location. You can insert hyperlinks by clicking the Hyperlink command on the Insert menu.

Security  Because field codes can be visible to anyone reading your document, be sure that the information you place in field codes is not information that you want kept private.

ShowInstructions

"Filename"

The destination you want to jump to. If the location includes a long file name with spaces, enclose it in quotation marks. Replace single backslashes with double backslashes to specify the path (path: The route that the operating system uses to locate a folder or file; for example, C:\House finances\March.doc.), for example:

"C:\\My Documents\\Manual.doc"

For Internet addresses, include the protocol and the same syntax as the URL (Uniform Resource Locator (URL): An address that specifies a protocol (such as HTTP or FTP) and a location of an object, document, World Wide Web page, or other destination on the Internet or an intranet, for example: http://www.microsoft.com/.), for example:

"http://www.microsoft.com/"

and "mailto:someone@example.com".

ShowSwitches

\l

Specifies a location in the file, such as a bookmark, where this hyperlink will jump.

\m

Appends coordinates to a hyperlink for a server-side image map (server-side image map: A graphic containing sensitive regions, or "hot spots," that a user can click to follow a hyperlink. A server-side image map requires a script on a Web server that identifies the sensitive regions and their corresponding hyperlinks.).

\n

Causes the destination site to be opened in a new window.

\o

Specifies the ScreenTip (ScreenTip: A short description that appears when the user holds the mouse pointer over an object, such as a button or hyperlink.) text for the hyperlink.

\t

Specifies the target that the link should be redirected into. Use this switch to link from a frames page to a page that you want to appear outside of the frames page. For example:

{ Hyperlink "filename" \t "_top" }

The destination Web page will appear in the entire browser window instead of a frame.

Options for the \t switch are:

\t "_top"

Whole page

\t "_self"

Same frame

\t "_blank"

New window

\t "_parent"

Parent frame

The default (without the switch specified) is Page Default (none).

ShowExamples

This field code (field code: Placeholder text that shows where specified information from your data source will appear; the elements in a field that generate a field's result. The field code includes the field characters, field type, and instructions.) and text: "The project's budget is final. Click { HYPERLINK "C:\\My Documents\\budget.xls" } for more information." produces the following:

"The project's budget is final. Click 1999 Budget for more information."

Clicking the blue text opens the worksheet called Budget.xls in the My Documents folder. The hyperlink display text (hyperlink display text: The part of a hyperlink in a document or Web page that appears as text on the screen.) is "1999 Budget" and isn't included in the field syntax. You can edit the display text for the field by typing over it.

advertisement