Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Print associated document hyperlinks
I have a word document that has hyperlinks in it. When I print it I
would like it to also print all associated hyperlink documents. Is this possible using VBA? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Print associated document hyperlinks
Assuming the hyperlinks you want to print are hyperlinks to other word
documents (*.doc) then Sub PrintDocAndHyperlinkedDocs() Dim iFld As Integer Dim sHlink As String Dim oLinkDoc As Document 'ActiveDocument.PrintOut For iFld = 1 To ActiveDocument.Fields.Count With ActiveDocument.Fields(iFld) sHlink = .Code.Text If InStr(1, sHlink, "doc""") Then sHlink = Replace(sHlink, "HYPERLINK ", _ "") Set oLinkDoc = Documents.Open(sHlink) oLinkDoc.PrintOut oLinkDoc.Close wdDoNotSaveChanges End If End With Next iFld End Sub should do the trick http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Worsty wrote: I have a word document that has hyperlinks in it. When I print it I would like it to also print all associated hyperlink documents. Is this possible using VBA? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
print hyperlinks | Microsoft Word Help | |||
Hyperlinks in Print Layout | Microsoft Word Help | |||
Print to PDF loses hyperlinks | Microsoft Word Help | |||
When I print a Word document to pdf, the hyperlinks show up | New Users | |||
How do I print a list of hyperlinks in a MS Word document? | Microsoft Word Help |