Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gets a Hyperlinks collection that represents all the hyperlinks in the document.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Syntax
'Declaration
Public ReadOnly Property Hyperlinks As Hyperlinks
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. To use this example, run it from the ThisDocument class in a document-level project.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.