Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Macro to expand all hyperlinks in place in a word document

786 views
Skip to first unread message

sande...@yahoo.com

unread,
Jun 22, 2013, 2:32:40 PM6/22/13
to
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

sande...@yahoo.com

unread,
Jun 23, 2013, 9:23:49 AM6/23/13
to
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

Stefan Blom

unread,
Jun 26, 2013, 5:18:28 AM6/26/13
to
Thanks for sharing it with us. :-)

--
Stefan Blom
Microsoft Word MVP



sandeep6699 wrote in message
news:a16592d9-a767-4e6c...@googlegroups.com...
0 new messages