Document.Hyperlinks property (Word)
Returns a Hyperlinks collection that represents all the hyperlinks in the specified document. Read-only.
Syntax
expression.Hyperlinks
expression A variable that represents a Document object.
Remarks
For information about returning a single member of a collection, see Returning an object from a collection.
Example
This example displays the target address of the second hyperlink in Home.doc.
If Documents("Home.doc").Hyperlinks.Count >= 2 Then
MsgBox Documents("Home.doc").Hyperlinks(2).Name
End If
This example displays the name of every hyperlink in the active document that includes the word "Microsoft" in its address.
For Each aHyperlink In ActiveDocument.Hyperlinks
If InStr(LCase(aHyperlink.Address), "microsoft") <> 0 Then
MsgBox aHyperlink.Name
End If
Next aHyperlink
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.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin