Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns a Hyperlinks collection that represents all the hyperlinks in the specified range. Read-only.
Syntax
expression.Hyperlinks
expression A variable that represents a Range object.
Remarks
For information about returning a single member of a collection, see Returning an object from a collection.
Example
This example displays the name of every hyperlink in the first ten paragraphs in the active document.
Dim objLink As Hyperlink 
Dim objRange As Range 
 
Set objRange = ActiveDocument.Range( _ 
 Paragraphs(1).Range.Start, _ 
 Paragraphs(10).Range.End) 
 
For Each objLink In objRange.Hyperlinks 
 If InStr(LCase(objLink.Address), "microsoft") <> 0 Then 
 MsgBox objLink.Name 
 End If 
Next objLink
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.