ShapeBaseHRef Property
Gets or sets the full hyperlink address for a shape.

Namespace: Aspose.Words.Drawing
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.12
Syntax
public string HRef { get; set; }

Property Value

Type: String
Remarks

The default value is an empty string.

Below are examples of valid values for this property:

Full URI: https://www.aspose.com/.

Full file name: C:\\My Documents\\SalesReport.doc.

Relative URI: ../../../resource.txt

Relative file name: ..\\My Documents\\SalesReport.doc.

Bookmark within another document: https://www.aspose.com/Products/Default.aspx#Suites

Bookmark within this document: #BookmakName.

Examples
Shows how to insert an image with a hyperlink.
// This creates a builder and also an empty document inside the builder.
DocumentBuilder builder = new DocumentBuilder();

Shape shape = builder.InsertImage(MyDir + "Images/Hammer.wmf");
shape.HRef = "http://www.aspose.com/Community/Forums/75/ShowForum.aspx";
shape.Target = "New Window";
shape.ScreenTip = "Aspose.Words Support Forums";

builder.Document.Save(ArtifactsDir + "Image.InsertImageWithHyperlink.doc");
See Also