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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top