Microsoft KB Archive/254686

= Visio5: How to Use Hyperlinks in Visio 5.0 =

Article ID: 254686

Article Last Modified on 11/25/2003

-

APPLIES TO


 * Visio 5.0 Standard
 * Visio 5.0 Professional
 * Visio 5.0 Technical
 * Visio 5.0 Enterprise

-



This article was previously published under Q254686



SUMMARY
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



Adding Hyperlinks
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.

Working with Hyperlinks
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:
 * 1) 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.
 * 2) Right-click the shape or drawing page in which you want to paste the hyperlink, and then click Paste.

Backward compatibility
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.

Developer information
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.

Hyperlink section
The Hyperlink section contains the following cells.

HYPERLINK function
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.

Syntax:
HYPERLINK(address,subaddress,[newWindow],[frame],[addHistory],[extraInfo],[method],[headerInfo]) This function supports the following arguments in addition to those defined above.

Adding More Than One Hyperlink to a Shape or Page
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:

HYPERLINK("http://www.microsoft.com")

 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"

 Close the ShapeSheet window, and right-click the shape or page to choose the new hyperlink.

Syntax for Hyperlinking to a Website
Be sure to use the following syntax for hyperlinking to a Web site

HTTP://www. .com

and not:

www. .com

If you use the www. .com syntax, Visio 5 will think it is a local file.

Keywords: kbhowto KB254686

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.