Working with Hyperlinks

Microsoft Office Visio supports adding the hyperlinks to any shape. The hyperlinks can link to another page or shape in the current drawing, a page or shape in another drawing, a document other than a Visio drawing, a Web site, FTP site, or e-mail address. Developers can use Aspose.Diagram API to easily add hyperlinks to a Visio shape.

In the multi page Visio drawing, hyperlinks can navigate you from one shape to many other types of the links. HyperlinkCollection exposed by the Shape class offers Add method which can be used to add a shape’s hyperlink.

To identify properties in Microsoft Office Visio:

  1. In a Visio diagram, right-click a shape.
  2. Select Hyperlink.
  3. Set existing properties
  4. Press OK button

A shape’s hyperlink data, as seen in Microsoft Visio

todo:image_alt_text

The code snippet below adds shape’s hyperlink data.

Developers can retrieve all hyperlinks from a Visio shape in the same way as they read Visio shape data using Aspose.Diagram for .NET API.

In the multi page Visio drawing, hyperlinks can navigate you from one shape to many other types of the links. HyperlinkCollection exposed by the Shape class allows developers to retrieve hyperlinks.

To identify properties in Microsoft Office Visio:

  1. In a diagram, right-click a shape.
  2. Select Hyperlink.

Any existing properties are listed in the dialog. A shape’s hyperlink data, as seen in Microsoft Visio

todo:image_alt_text

A console window showing the shape data output

todo:image_alt_text

The code snippet below reads shape’s hyperlink data.