Hyperlinks Collection Object
Word Developer Reference |
Represents the collection of Hyperlink objects in a document, range, or selection.
Remarks
Use the Hyperlinks property to return the Hyperlinks collection. The following example checks all the hyperlinks in document one for a link that contains the word "Microsoft" in the address. If a hyperlink is found, it is activated with the Follow method.
Visual Basic for Applications |
---|
|
Use the Add method to create a hyperlink and add it to the Hyperlinks collection. The following example creates a new hyperlink to the MSN Web site.
Visual Basic for Applications |
---|
|
Use Hyperlinks(Index), where Index is the index number, to return a single Hyperlink object in a document, range, or selection. The following example activates the first hyperlink in the selection.
Visual Basic for Applications |
---|
|
The Count property for this collection in a document returns the number of items in the main story only. To count items in other stories use the collection with the Range object.
See Also