Search and print PDF hyperlinks in a word doc

G

Greg Zombek

I have a checklist of documents and PDF files I have hyperlinked to in
this word doc.

I would like to send the documents and all the hyperlinks files to a
PDF organizer program. I can print to hyperlinked Word files to this
organizer now but the PDF open in word and cause it to print the happy
face junk
and ideas here is what i have so far

Set oWord = CreateObject("Word.Application")
oWord.WordBasic.FilePrintSetup Printer:="pdfDocs", _
DoNotSetAsSysDefault:=1
Dim h As Hyperlink
Dim d As Word.Document
If ActiveDocument.Hyperlinks.Count > 0 Then
Application.ScreenUpdating = False
For Each h In ActiveDocument.Hyperlinks
'Debug.Print h.Address
If Dir$(h.Address) <> "" Then
Set d = Application.Documents.Open(FileName:=h.Address,
Visible:=False)
d.PrintOut Background:=True
d.Close Savechanges:=False
Set d = Nothing
End If
Next h
Application.ScreenUpdating = True
End If
'ActiveDocument.PrintOut
End Sub
 

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