Hi
I have a list of pdf file paths as hyperlinks in column D. I want a macro that opens all files in column d and prints them. I am very new to excel and vba and i have been fiddling with the below code but to no avial. hyperlinks are in the following format - C:\Users\Mags\Desktop\back.pdf
The below code opens my pdf reader but I can not adapt it to run through column D until empty cell
Sub PrintPDF(strPDFFileName As String)
Dim sAdobeReader As String
sAdobeReader = "C:\Program Files (x86)\Nuance\PDF Reader\bin\PDFReader.exe"
RetVal = Shell(sAdobeReader & "/P" & Chr(34) & sStrPDFFileName & Chr(34), 0)
End Sub
End Sub
The below code searches through column D and opens the files but does not print
Sub HyperOpen()
Dim cell As Range
Dim r As Integer 'Last used row in column D
On Error Resume Next
'Last used row in column D
r = Range("D65536").End(xlUp).Row
For Each cell In Range("D2:D5000" & r) 'Range containing hyperlinks
cell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=False
Next cell
End Sub
Sub Hyper()
Bookmarks