Macro to expand all hyperlinks in place in a word document


S

sandeep6699

Hello,

I would appreciate if someone could suggest how I can expand all hyperlinks in a word document AT THE CORRECT PLACE. I know that with Alt+F9 you can switch between the label view and the hyperlink view, but I want to see both at the same time.

Thanks,
SS
 
Ad

Advertisements

S

sandeep6699

Hello,



I would appreciate if someone could suggest how I can expand all hyperlinks in a word document AT THE CORRECT PLACE. I know that with Alt+F9 you can switch between the label view and the hyperlink view, but I want to see both at the same time.



Thanks,

SS

Thanks to the following website, I was able to come up with the macros that I wanted:
http://www.msofficeforums.com/word-vba/11940-word-macro-reformats-embedded-links-doc.html


Sub TagHyperlinks()
Dim HLnk As Hyperlink
For Each HLnk In ActiveDocument.Hyperlinks
HLnk.Range.InsertAfter " (" & HLnk.Address & ") "
Next
End Sub


Sub TagHyperlinks_selected()
Dim HLnk As Hyperlink
With Selection.Find
For Each HLnk In Selection.Hyperlinks
HLnk.Range.InsertAfter " (" & HLnk.Address & ") "
Next
End With
End Sub



SS
 
Ad

Advertisements

S

Stefan Blom

Thanks for sharing it with us. :)

--
Stefan Blom
Microsoft Word MVP



sandeep6699 wrote in message
 

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

Top