Microsoft KB Archive/254686
Article ID: 254686
Article Last Modified on 11/25/2003
- Visio 5.0 Standard
- Visio 5.0 Professional
- Visio 5.0 Technical
- Visio 5.0 Enterprise
This article was previously published under Q254686
Visio 5.0 includes built-in hyperlinking support, which takes the place of the Insert Hyperlink Wizard that was included with earlier versions of Visio. Built-in hyperlinking support makes adding hyperlinks and moving between linked shapes and documents faster and easier. This article contains the following topics:
- Adding Hyperlinks
- Working with Hyperlinks
- Backward Compatibility
- Developer Information
Visio 5.0 provides these options for adding hyperlinks to shapes and drawings:
- The Hyperlink command on the Insert menu
- The Insert Hyperlink button on the Web toolbar
- The Action section of the ShapeSheet window
NOTE: To display the Web toolbar, right-click the Visio toolbar, and then click Web.
The Web toolbar also includes buttons for starting the Shape Explorer, searching the Web, and moving forward and back between Visio drawings and other ActiveX documents, such as Microsoft Office documents and HTML documents that you open in Microsoft Internet Explorer 3.01 or later.
To quickly add a hyperlink, select the shape to which you want to add the link (leave shapes unselected if you want to add a link to the drawing page), and then either click Hyperlink on the Insert menu or click the Insert Hyperlink toolbar button.
After you choose to add a hyperlink, the Hyperlink dialog box appears. In this dialog box, you define the link in three sections. The dialog box includes descriptions of each section, but for detailed instructions, see the chapter "Adding hyperlinks to shapes and drawings," in the Using Visio Products manual or in Visio Help.
This section explains how to work with hyperlinks after you add them to objects.
To determine whether an object contains a hyperlink, move the mouse pointer over the object. If it contains a hyperlink, the Insert Hyperlink icon appears next to the pointer. In addition, if you typed text in the Descriptive Name Of Link section of the Hyperlink dialog box, that text appears, helping you identify the link's destination.
To jump to a hyperlink's destination, right-click the shape or page that contains the hyperlink, point to Hyperlink, and then click Open. If Visio is in full-screen view, simply click the shape or page. For details about full-screen view, see Visio Help.
To copy a hyperlink to another shape or drawing page:
- Right-click the shape or drawing page that contains the hyperlink that you want to copy, point to Hyperlink, and then click Copy Hyperlink. This places the hyperlink on the Clipboard.
- Right-click the shape or drawing page in which you want to paste the hyperlink, and then click Paste.
Earlier versions of Visio included a wizard for adding hyperlinks to shapes and drawing pages. With the wizard, you could add more than one hyperlink to an object. Although Visio 5.0 built-in hyperlinking support allows you to add only one hyperlink per object, earlier-version drawings that contain shapes or pages with multiple hyperlinks retain all their links when you open them in Visio 5.0. The first hyperlink is stored in the Hyperlink section of the ShapeSheet window, as it would be if you originally created it in Visio 5.0. The remaining hyperlinks are retained in the Actions and User-Defined sections of the ShapeSheet window, and appear on the object's shortcut menu.
With Visio 5.0, it's still possible to add more than one hyperlink to an object; however, to do so, you need to work with the object's ShapeSheet. For details, see the "Adding More Than One Hyperlink to a Shape or Page" topic in the "Developer Information" section later in this article.
Hyperlinking components introduced in Visio 5.0 include the Hyperlink ShapeSheet section and the HYPERLINK function. For more information about these topics, see the "HYPERLINK function" and "Hyperlink section" topics in Visio 5.0 Help.
The Hyperlink section contains the following cells.
|Description||Optional - This cell contains a text string that is displayed when the mouse pointer pauses over the shape that contains the hyperlink. The text for this cell is also defined in the Descriptive Name Of Link section in the Hyperlink dialog box.|
|Address||This cell contains the address to the hyperlink. This cell holds the address the user enters in the Link To File Or URL section of the Hyperlink dialog box. The cell can contain any DOS, UNC, or URL path, for example, C:\Drawings\MyDrawing.VSD, \\SERVER\SHARE\MyDrawing.VSD, or www.microsoft.com.|
|SubAddress||Optional - This cell contains a sublocation within the hyperlink address. For example, if the hyperlink is to a Visio file, then the SubAddress could be a page name within that drawing, for example, Page-3.|
|ExtraInfo||Optional - This cell contains extra URL-request information used in resolving the URL. For example, you could use this cell to pass the coordinates of an image map. The default value is an empty string.|
|Frame||Optional - This cell specifies the name of a frame to target. This only applies when Visio is open as an ActiveX document in an ActiveX browser. The default value is an empty string.|
|NewWindow||Optional - This cell contains a Boolean value (TRUE or FALSE) that specifies whether or not the hyperlink should be opened in a new window. The default value is FALSE.|
You can use the HYPERLINK function in the Actions section to add more than one hyperlink to the same object. For details, see the "Adding More Than One Hyperlink to a Shape or Page" section later in this article.
This function supports the following arguments in addition to those defined above.
|AddHistory||Optional - This is a Boolean value (TRUE or FALSE) that determines whether or not the hyperlink should be added to the history navigation list. The default value is TRUE.|
|Method||Optional - HTTP request method. Specifies how extra information is attached. Can be one of the predefined values, visMethodGet, visMethodPost, or visMethodPostFile.|
|HeaderInfo||Optional - Contains extra HTTP header information to add the hyperlink's HTTP request header. Only valid for addresses which are loaded via the http protocol. Default is an empty string.|
In Visio 5.0, you add a hyperlink to an object with the Hyperlink command on the Insert menu. Then, to work with the hyperlink, you right-click the object, and click commands on the Hyperlink shortcut menu.
To add more links to the same shape or page, you use the HYPERLINK function to add each link's information in that object's ShapeSheet window. Each link that you add after the first link appears as a separate item on the object's shortcut menu. No matter how many subsequent hyperlinks you add to an object, the Hyperlink command is associated only with the first--the one you added with the Hyperlink command on the Insert menu.
NOTE: The following procedure assumes familiarity with the ShapeSheet window, such as viewing and adding rows and sections, and selecting and editing cells. To add a hyperlink in the ShapeSheet:
- Select the shape to which you want to add the link, or leave shapes unselected to add a link to the drawing page, and then click Show ShapeSheet on the Window menu.
- In the ShapeSheet window, scroll to the Actions section, select the last row by clicking the row number, and then click Row After on the Insert menu to add a new row for the HYPERLINK function.
If you don't see the Actions section, click Sections on the View menu to make it visible. If Actions is not available in this dialog box, click Cancel, and then click Section on the Insert menu to add a new Actions section.
- In the Action cell of the Actions section, use the HYPERLINK function with the path name of the file or the URL of the Internet site that you want to link the shape or page to. For example, to add a link to the Microsoft Web site, as in the following table, type the following:
- In the Menu cell, within quotation marks, type the text that you want to identify the link. This text appears on the object's shortcut menu, for example:"Microsoft on the Web"
Actions Action Menu 1 HYPERLINK("http://www.microsoft.com") "Microsoft on the Web"
- Close the ShapeSheet window, and right-click the shape or page to choose the new hyperlink.
Be sure to use the following syntax for hyperlinking to a Web site
If you use the www.<yoursite>.com syntax, Visio 5 will think it is a local file.
Keywords: kbhowto KB254686