Visio.Hyperlink class

Represents the Hyperlink.

[ API set: 1.1 ]

Extends
OfficeExtension.ClientObject

Properties

address

Gets the address of the Hyperlink object. Read-only.

[ API set: 1.1 ]

description

Gets the description of a hyperlink. Read-only.

[ API set: 1.1 ]

extraInfo

Gets the extra URL request information used to resolve the hyperlink's URL. Read-only.

[ API set: 1.1 ]

subAddress

Gets the sub-address of the Hyperlink object. Read-only.

[ API set: 1.1 ]

Methods

load(option)

Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.

toJSON()

Property Details

address

Gets the address of the Hyperlink object. Read-only.

[ API set: 1.1 ]

readonly address: string;

Property Value

string

description

Gets the description of a hyperlink. Read-only.

[ API set: 1.1 ]

readonly description: string;

Property Value

string

extraInfo

Gets the extra URL request information used to resolve the hyperlink's URL. Read-only.

[ API set: 1.1 ]

readonly extraInfo: string;

Property Value

string

subAddress

Gets the sub-address of the Hyperlink object. Read-only.

[ API set: 1.1 ]

readonly subAddress: string;

Property Value

string

Method Details

load(option)

Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.

load(option?: string | string[]): Visio.Hyperlink;

Parameters

option
string | string[]

A comma-delimited string or an array of strings that specify the properties to load.

Returns

Remarks

In addition to this signature, this method has the following signatures:

load(option?: { select?: string; expand?: string; }): Visio.Hyperlink - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load.

load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Visio.Hyperlink - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items.

Examples

Visio.run(session, function (ctx) {
    var activePage = ctx.document.getActivePage();
    var shape = activePage.shapes.getItem(0);
    var hyperlink = shape.hyperlinks.getItem(0);
    hyperlink.load();
    return ctx.sync().then(function() {
        console.log(hyperlink.description);
        console.log(hyperlink.address);
        console.log(hyperlink.subAddress);
        console.log(hyperlink.extraInfo);
     });
}).catch(function(error) {
    console.log("Error: " + error);
    if (error instanceof OfficeExtension.Error) {
        console.log("Debug info: " + JSON.stringify(error.debugInfo));
    }
});

toJSON()

toJSON(): Visio.Interfaces.HyperlinkData;

Returns