Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Reference
 Hyperlinks Property (2007 System)

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
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)
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.

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);
}

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker