Working with Hyperlinks
Add Hyperlink to a Visio Shape
It is an easy approach to add hyperlink to Microsoft Visio shape dynamically.
On multi page Visio drawings, hyperlinks can move you from one page to another. You also can link your drawing to a web page or a file on your system.
These properties are exposed by the Shape class supports the com.aspose.diagram.Hyperlink object. The add method can be used to add a shape’s hyperlink data.
To identify properties in Microsoft Visio:
- In a diagram, right-click a shape.
- Select Hyperlink.
- Set existing properties
- Press OK button
A shape’s hyperlink data, as seen in Microsoft Visio
The code snippets below adds shape’s hyperlink data.
Add Hyperlink Programming Sample
Get Hyperlinks Data of the Visio Shapes
It is possible to get a shape’s hyperlink data in a similar way that you reading Visio shape data.
Developers can retrieve all hyperlinks from a Visio shape in the same way as they read Visio shape data using Aspose.Diagram for Java API
In multipage Visio drawings, hyperlinks can move you from one page to another. You also can link your drawing to a web page or a file on your system.
These properties are exposed by the Shape class supports the com.aspose.diagram.Hyperlink object. The property can be used to read a shape’s hyperlink data.
To identify properties in Microsoft 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
The code snippets below reads shape’s hyperlink data.