Working with Hyperlinks
Add Hyperlink to a Visio Shape
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:
- In a Visio diagram, right-click a shape.
- Select Hyperlink.
- Set existing properties
- Press OK button
A shape’s hyperlink data, as seen in Microsoft Visio
Add Hyperlink Programming Sample
The code snippet below adds shape’s hyperlink data.
Get Hyperlinks Data of the Visio Shapes
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:
- In a diagram, right-click a shape.
- Select Hyperlink.
Any existing properties are listed in the dialog. A shape’s hyperlink data, as seen in Microsoft Visio
A console window showing the shape data output
Get Hyperlinks Programming Sample
The code snippet below reads shape’s hyperlink data.