Expand Minimize

NamedRange.Hyperlinks Property

Gets a Hyperlinks collection that represents the hyperlinks in the NamedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Hyperlinks Hyperlinks { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.Hyperlinks
A Hyperlinks collection that represents the hyperlinks in the NamedRange control.

The following code example creates a NamedRange and then uses the Hyperlinks property to add a hyperlink to the NamedRange.

This example is for a document-level customization.

Microsoft.Office.Tools.Excel.NamedRange hyperlinkRange;
private void AddHyperlink()
{
    hyperlinkRange = this.Controls.AddNamedRange(
        this.Range["B4"], "hyperlinkRange");
    this.hyperlinkRange.Hyperlinks.Add(this.hyperlinkRange.Cells,
        "http://www.contoso.com", "Contoso Web Site",
        "www.contoso.com");
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft