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)
Visual Basic (Declaration)
<BrowsableAttribute(False)> _
Public ReadOnly Property Hyperlinks As Hyperlinks
Dim instance As Document
Dim value As Hyperlinks
value = instance.Hyperlinks
[BrowsableAttribute(false)]
public Hyperlinks Hyperlinks { get; }
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 = "http://www.msn.com/"
Me.Hyperlinks.Add(Me.Paragraphs(1).Range, address)
End Sub
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);
}
Reference