kmackie1
07-31-2013, 10:32 AM
I am willing to name my first born son after the gentleman that helps me solve this issue. I'm desperate!
I have this code that will open all PDFs in a folder, print them, and close Adobe Acrobat. What I need to happen is to open an EMBEDDED PDF already in the document, print it, and close Adobe Reader.
Public Sub PrintPDFFiles()
Const ADOBEPATH As String = "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe"
Const FILE_PATH As String = "C:\Users\kmackie\Desktop\Sample\Test"
Const FILE_EXT As String = "PDF"
Dim fso, fld, file
Set fso = CreateObject("Scripting.FileSystemObject")
Set fld = fso.GetFolder(FILE_PATH)
For Each file In fld.Files
If UCase(Right(file.Name, 3)) = FILE_EXT Then
Shell """" & ADOBEPATH & """/n /t """ & file.Path & """"
End If
Next
End Sub
This code will open the embedded PDF, but I can't figure out how to make Adobe Reader print the darn PDF:
ActiveSheet.Shapes("Object 6").Select
Selection.Verb Verb:=xlPrimary
Please help me!!! All I want is to figure out how to make Adobe Reader print the document once its open.
:banghead:
I have this code that will open all PDFs in a folder, print them, and close Adobe Acrobat. What I need to happen is to open an EMBEDDED PDF already in the document, print it, and close Adobe Reader.
Public Sub PrintPDFFiles()
Const ADOBEPATH As String = "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe"
Const FILE_PATH As String = "C:\Users\kmackie\Desktop\Sample\Test"
Const FILE_EXT As String = "PDF"
Dim fso, fld, file
Set fso = CreateObject("Scripting.FileSystemObject")
Set fld = fso.GetFolder(FILE_PATH)
For Each file In fld.Files
If UCase(Right(file.Name, 3)) = FILE_EXT Then
Shell """" & ADOBEPATH & """/n /t """ & file.Path & """"
End If
Next
End Sub
This code will open the embedded PDF, but I can't figure out how to make Adobe Reader print the darn PDF:
ActiveSheet.Shapes("Object 6").Select
Selection.Verb Verb:=xlPrimary
Please help me!!! All I want is to figure out how to make Adobe Reader print the document once its open.
:banghead: