Share via


Hyperlinks.Add Method

Returns a Hyperlink object that represents a new hyperlink added to a range, selection, or document.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function Add ( _
    Anchor As Object, _
    ByRef Address As Object, _
    ByRef SubAddress As Object, _
    ByRef ScreenTip As Object, _
    ByRef TextToDisplay As Object, _
    ByRef Target As Object _
) As Hyperlink
'Usage
Dim instance As Hyperlinks
Dim Anchor As Object
Dim Address As Object
Dim SubAddress As Object
Dim ScreenTip As Object
Dim TextToDisplay As Object
Dim Target As Object
Dim returnValue As Hyperlink

returnValue = instance.Add(Anchor, Address, _
    SubAddress, ScreenTip, TextToDisplay, _
    Target)
Hyperlink Add(
    Object Anchor,
    ref Object Address,
    ref Object SubAddress,
    ref Object ScreenTip,
    ref Object TextToDisplay,
    ref Object Target
)

Parameters

  • Anchor
    Type: System.Object
    Required Object. The text or graphic that you want turned into a hyperlink.
  • Address
    Type: System.Object%
    Optional Object. The address for the specified link. The address can be an e-mail address, an Internet address, or a file name. Note that Microsoft Word doesn't check the accuracy of the address.
  • SubAddress
    Type: System.Object%
    Optional Object. The name of a location within the destination file, such as a bookmark, named range, or slide number.
  • ScreenTip
    Type: System.Object%
    Optional Object. The text that appears as a ScreenTip when the mouse pointer is positioned over the specified hyperlink. The default value is Address.
  • TextToDisplay
    Type: System.Object%
    Optional Object. The display text of the specified hyperlink. The value of this argument replaces the text or graphic specified by Anchor.
  • Target
    Type: System.Object%
    Optional Object. The name of the frame or window in which you want to load the specified hyperlink.

Return Value

Type: Microsoft.Office.Interop.Word.Hyperlink

See Also

Reference

Hyperlinks Interface

Hyperlinks Members

Microsoft.Office.Interop.Word Namespace