Hyperlink.CreateURL Method
Visio Automation Reference |
Returns a fully qualified and optionally canonicalized representation of the hyperlink's absolute address.
Version Information
Version Added: Visio 5.0
Syntax
expression.CreateURL(CanonicalForm)
expression A variable that represents a Hyperlink object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
CanonicalForm | Required | Integer | True (non-zero) if canonical form; otherwise, False (0). |
Return Value
String
Remarks
The CreateURL method of the Hyperlink object can be used to resolve relative URLs against a hyperlink's base address.
When you use the canonical form, the CreateURL method applies URL canonicalization rules to the hyperlink. Only spaces are URL-encoded during canonicalization. Port 80 is assumed for HTTP URLs and is removed during canonicalization. For example, the URL "http://www.microsoft.com:80/" is returned as "http://www.microsoft.com/", whereas http://www.microsoft.com:1000/" is unchanged.
Example
Here are some examples of results of the CreateURL method:
Visual Basic for Applications |
---|
|
Relative path example:
Visual Basic for Applications |
---|
|
The following example shows how to use the CreateURL method to resolve relative URLs against the base address of a hyperlink. Before running this macro, replace
drive\folder\subfolder
with a valid file path on your computer, replace
address
with a valid Internet or intranet address, and replace
drawing.vsd
with a valid file on your computer.
Visual Basic for Applications |
---|
|
See Also