Table of contents
Collapse the table of content
Expand the table of content

Document.FollowHyperlink Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Navigates to an arbitrary hyperlink.


expression . FollowHyperlink( Address , SubAddress , ExtraInfo , Frame , NewWindow , res1 , res2 , res3 )

expression A variable that represents a Document object.


NameRequired/OptionalData TypeDescription
AddressRequiredStringThe address to which you want to navigate. If you pass an incorrect or non-existent path or filename for Address, Visio displays an error message.
SubAddressRequiredStringThe secondary address to which you want to navigate; if you don't need this information, pass an empty string. If Address is the full path of a Visio document that contains multiple pages, for example, you can use SubAddress to specify the page.
ExtraInfoOptionalVariantExtra URL request information to use in resolving the URL.
FrameOptionalVariantThe HTML frame to which to navigate.
NewWindowOptionalVariantSpecifies if a new window is to be opened. Passing any non-zero number or True opens the linked page in a new window.

Return Value



If you don't need to pass any information for one or more optional arguments, from Microsoft Visual Basic or Visual Basic for Applications, do not pass a value. From C or C++, pass an empty variant.

Visio 4.5 provided an undocumented Hyperlink method for a Document object that had the following signature:

HRESULT FollowHyperlink[in] (BSTR Target, [in] BSTR Location);

Visio 5.0 and later still support this method but it has been renamed FollowHyperlink45 :

HRESULT FollowHyperlink45[in] (BSTR Target, [in] BSTR Location);

Use of FollowHyperlink45 is discouraged, however?unless you are using version 4.5, use FollowHyperlink instead.


This Microsoft Visual Basic for Applications (VBA) macro shows how to use the FollowHyperlink method to navigate to a site on the Internet and view the resulting Web page in a new browser window. It also shows how to navigate to the second page of the current document and to the first page of another document on your computer. Before running the macro, substitute the path and file name of a valid Visio document on your computer for <path\filename>.

Public Sub FollowHyperlink_Example() 

 'Navigate to the Microsoft Web site and view the page in a new browser window. 
 ThisDocument.FollowHyperlink "", "", , , 1 

 'Navigate to the second page of the current document. 
 ThisDocument.FollowHyperlink "", "Page-2" 

 'Navigate to the first page of another document 
 ThisDocument.FollowHyperlink "<path\filename> ", "Page-1" 

End Sub
© 2018 Microsoft