Extract hyperlink from a Word document?

  • Thread starter Thread starter Margaret Bartley
  • Start date Start date
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
 
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,
 
Back
Top