Document Properties (2007 ...


Visual Studio Tools for Office API Reference
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

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

value = instance.Hyperlinks
C#
[BrowsableAttribute(false)]
public Hyperlinks Hyperlinks { get; }

Property Value

Type: Microsoft.Office.Interop.Word..::.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.

Visual Basic
Private Sub DocumentDefaultTargetFrame()
    Me.DefaultTargetFrame = "_blank"
    Dim address As Object = "http://www.msn.com/"
    Me.Hyperlinks.Add(Me.Paragraphs(1).Range, address)
End Sub

C#
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);
}
Permissions

See Also

Reference

Tags :


Page view tracker