Printing hyperlink/field targets in Word

  • Thread starter Thread starter Diona
  • Start date Start date
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
 
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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top