Export (0) Print
Expand All
Expand Minimize

Document.Hyperlinks Property (2007 System)

Gets a Hyperlinks collection that represents all the hyperlinks in the document.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

[BrowsableAttribute(false)]
public Hyperlinks Hyperlinks { get; }

Property Value

Type: Hyperlinks
A Hyperlinks collection that represents all the hyperlinks in the document.

The following code example sets Microsoft Office Word to open a new blank browser window when you click hyperlinks in the document.

This example is for a document-level customization.

private void DocumentDefaultTargetFrame()
{
    this.DefaultTargetFrame = "_blank";
    object address = "http://www.msn.com/";
    this.Hyperlinks.Add(this.Paragraphs[1].Range, ref address, ref missing, 
        ref missing, ref missing,ref missing);
}

Community Additions

ADD
Show:
© 2015 Microsoft