Printing hyperlink/field targets in Word

D

Diona

We are working at doing some updates to chapter documents. As the web person,
I would like the Word documents to print out the hyperlinks. Is there a way
to do that as it usually just prints the words where the hyperlinks are
linked from as text. For example:

References: DR 3440-2 - Control and Protection of “Sensitive Security
Informationâ€

The 'DR 3440-2' is hyperlinked to
http://www.ocio.usda.gov/directives/doc/DR3440-002.pdf but only prints as DR
3440-2 text. Is there a way to print the hyperlinks after the text like:
DR 3440-2 (http://www.ocio.usda.gov/directives/doc/DR3440-002.pdf)?

Thanks,
Diona
 
P

Pamelia Caswell via OfficeKB.com

Yes. Instead of hyperlinking to the document's publication number,
hyperlink to the address itself, pretty much as you've shown it.

Pam
 
G

Graham Mayor

The following macro should do that. It puts the hyperlink address in
brackets after each hyperlink, prints the document, then restores the
original

Sub PrintFullHLink()
Dim oDoc As Document
Dim oHyp As Hyperlink
Dim oRng As Range
Dim sFname As String
Set oDoc = ActiveDocument
oDoc.Save
sFname = oDoc.FullName
For Each oHyp In oDoc.Hyperlinks
Set oRng = oHyp.Range
oRng.InsertAfter Chr(32) & Chr(40) & oHyp.Address & Chr(41)
Next oHyp
oDoc.PrintOut
oDoc.Close wdDoNotSaveChanges
Documents.Open sFname
End Sub

http://www.gmayor.com/installing_macro.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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