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)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Hyperlinks As Hyperlinks
'Usage
Dim instance As Document 
Dim value As Hyperlinks 

value = instance.Hyperlinks
[BrowsableAttribute(false)]
public Hyperlinks Hyperlinks { get; }
[BrowsableAttribute(false)]
public:
property Hyperlinks^ Hyperlinks {
    Hyperlinks^ get ();
}
public function get Hyperlinks () : Hyperlinks

Property Value

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

Examples

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 Sub DocumentDefaultTargetFrame()
    Me.DefaultTargetFrame = "_blank" 
    Dim address As Object = "https://www.msn.com/" 
    Me.Hyperlinks.Add(Me.Paragraphs(1).Range, address)
End Sub
private void DocumentDefaultTargetFrame()
{
    this.DefaultTargetFrame = "_blank";
    object address = "https://www.msn.com/";
    this.Hyperlinks.Add(this.Paragraphs[1].Range, ref address, ref missing, 
        ref missing, ref missing,ref missing);
}

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace