Hello all...
I've written a program that let's the user select files within a folder and automatically print them. Where I am having trouble at is getting the program to print PDF files. Below is the code I am using:
'**********************************************************
Public Function AcrobatPrint()
Dim Acroapp As CAcroApp
Dim avCodeFile As CAcroAVDoc
Dim avFormCapture As CAcroAVDoc
Dim pdCodeFile As CAcroPDDoc
Dim pdFormCapture As CAcroPDDoc
Dim lngPage As Long
Dim AVPage As CAcroAVPageView
Dim PDPage As CAcroPDPage
filey = "*file location*"*place the location of the file in between the quotes, for debugging purposes only
Set Acroapp = CreateObject("AcroExch.App")
Acroapp.Show
Set avCodeFile = CreateObject("AcroExch.AVDoc") 'This is the code file
avCodeFile.Open filey, "tempfile"
avCodeFile.PrintPages 1, 1, 1, 1, 1
End Function
***********************************************************
I know that the values I have to the right of "avCodeFile.PrintPages" are incorrect, because everytime i run the program when it hits this line of code the "data" light on the front of my printer blinks twice and then nothing happens.
Does anyone know more about printing PDF files using VBA?
Thanks much in advance.
I've written a program that let's the user select files within a folder and automatically print them. Where I am having trouble at is getting the program to print PDF files. Below is the code I am using:
'**********************************************************
Public Function AcrobatPrint()
Dim Acroapp As CAcroApp
Dim avCodeFile As CAcroAVDoc
Dim avFormCapture As CAcroAVDoc
Dim pdCodeFile As CAcroPDDoc
Dim pdFormCapture As CAcroPDDoc
Dim lngPage As Long
Dim AVPage As CAcroAVPageView
Dim PDPage As CAcroPDPage
filey = "*file location*"*place the location of the file in between the quotes, for debugging purposes only
Set Acroapp = CreateObject("AcroExch.App")
Acroapp.Show
Set avCodeFile = CreateObject("AcroExch.AVDoc") 'This is the code file
avCodeFile.Open filey, "tempfile"
avCodeFile.PrintPages 1, 1, 1, 1, 1
End Function
***********************************************************
I know that the values I have to the right of "avCodeFile.PrintPages" are incorrect, because everytime i run the program when it hits this line of code the "data" light on the front of my printer blinks twice and then nothing happens.
Does anyone know more about printing PDF files using VBA?
Thanks much in advance.