Class Hyperlink (Word VBA)

The class Hyperlink represents a hyperlink. The Hyperlink object is a member of the Hyperlinks collection.

The classes InlineShape and Shape. give access to class Hyperlink


Dim hyp as Hyperlink
Set hyp = Selection.Hyperlinks(Index:=1)

For Each

Here is an example of processing the Hyperlink items in a collection.


Dim hyp As Hyperlink
For Each hyp In Selection.Hyperlinks
	hyp.AddToFavorites
Next hyp

Methods

AddToFavorites - Creates a shortcut to the document or hyperlink and adds it to the Favorites folder.

CreateNewDocument - Creates a new document linked to the specified hyperlink.

Delete - Deletes the specified hyperlink.

Follow - Displays a cached document associated with the specified Hyperlink object, if it has already been downloaded. Otherwise, this method resolves the hyperlink, downloads the target document, and displays the document in the appropriate application.

Properties

Address returns or sets the address (for example, a file name or URL) of the specified hyperlink.

EmailSubject returns or sets the text string for the specified hyperlink's subject line.

ExtraInfoRequired true if extra information is required to resolve the specified hyperlink.

Name returns the name of the specified object.

Range returns a Range object that represents the portion of a document that is contained within a hyperlink.

ScreenTip returns or sets the text that appears as a ScreenTip when the mouse pointer is positioned over the specified hyperlink.

Shape returns a Shape object for the specified hyperlink or diagram node.

SubAddress returns or sets a named location in the destination of the specified hyperlink.

Target returns or sets the name of the frame or window in which to load the hyperlink.

TextToDisplay returns or sets the specified hyperlink's visible text in a document.

Type returns the hyperlink type.

Range - Represents a contiguous area in a document. Each Range object is defined by a starting and ending character position.

Shape - Represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, ActiveX control, or picture. The Shape object is a member of the Shapes collection, which includes all the shapes in the main story of a document or in all the headers and footers of a document.