Extract hyperlink from a Word document?

M

Margaret Bartley

Does anyone have a code snippet that will extract a hyperlink from a Word
document? The hyperlink is not bookmarked nor selected, so the code will
have to find the hyperlink in the document.

Many thanks

Margaret
 
G

George Nicholson

From the Hyperlinks property Help entry in Word:

For Each aHyperlink In ActiveDocument.Hyperlinks
If InStr(LCase(aHyperlink.Address), "microsoft") <> 0 Then
MsgBox aHyperlink.Name
End If
Next aHyperlink

HTH,
 
Top