Hyperlink.Address property (Visio)

Gets or sets the address for a shape's Hyperlink object, the address to which the hyperlink navigates. Read/write.

Syntax

expression.Address

expression A variable that represents a Hyperlink object.

Return value

String

Remarks

Setting the Address property for a Hyperlink object is equivalent to entering information in the Address box in the Hyperlinks dialog box (Insert menu), or setting the result of the Address cell in the shape's Hyperlink.name row in the ShapeSheet window.

The Address property value can be a DOS, UNC, or URL path, for example, "driveletter":\ "foldername" \ "drawingname", \ "servername"\ "foldername"\ "drawingname", or https://address, respectively.

If the Address property is relative, for example, "..\ "drawingname", it is composed against the HyperlinkBase property, if supplied, or the hyperlink's document path. If the document is not saved, the hyperlink is undefined.

If the Address property is empty, you can assume that the address points to a page in the document that contains the page. In this case, the SubAddress property contains the name of the drawing page to which the hyperlink navigates.

Example

This Microsoft Visual Basic for Applications (VBA) macro sets the Address property of a Hyperlink object. Before running this example, replace address with a valid Internet or intranet address.

 
Public Sub Address_Example() 
 
 Dim vsoShape As Visio.Shape 
 Dim vsoHyperlink As Visio.Hyperlink 
 
 'Create a new shape to receive the hyperlink 
 Set vsoShape = ActivePage.DrawRectangle(1, 2, 2, 1) 
 Set vsoHyperlink = vsoShape.AddHyperlink 
 
 vsoHyperlink.Description = "Web site" 
 vsoHyperlink.Address = "https://address /" 
 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.