Partager via


Range.Hyperlinks Property (Word)

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

Concepts

Range Object Members

Range Object