C
Chuck Reed
I have a MS Access data base that creates custom reports for clients
in PDF form then prints the reports after all client's reports have
been printed. The problem that I have run into is that when acrobat is
printing to my printer, I can get it to print only the first page of a
report(OPTION 1 BELOW) or it is spooled to the printer then deleted in
the print cue before it it printed (OPTION 2 BELOW).
It's been very frustrating trying to get these reports to print and
I've logged over 20 hours reading posts to see if anyone else was
having a similar problem. I'm using Acrobat 5 and an HP office jet
7130 printer. I have tried the DDE option of printing but it too has
some quirks that just are not acceptable.
Any help would be appreciated!
Chuck Reed
(e-mail address removed)
Option Explicit
Dim AcrDoc As CAcroAVDoc,AcrApp as CAcroApp,AcroPDDoc As CAcroPDDoc
Sub testprintpdf()
OpenAcrobat
PrintPDFDoc "G:\Weekly Reports\ReportTemp\2\1Daily.pdf"
CloseAcrobat
End Sub
Private Sub OpenAcrobat()
Set AcrApp = CreateObject("AcroExch.App")
AcrApp.Maximize 1
DoEvents
End Sub
Private Sub PrintPDFDoc(x As String)
Dim AcrDoc As CAcroAVDoc, lngPages As Long
Set AcrDoc = CreateObject("AcroExch.AVDoc")
AcrDoc.Open x, "PDF Print"
DoEvents
Set AcroPDDoc = AcrDoc.GetPDDoc
lngPages = AcroPDDoc.GetNumPages
'OPTION 1
AcrDoc.PrintPages 0, lngPages, 1, True, True 'HERE THE PRINT QUE
DELETES AFTER SPOOLING IF I USE THIS COMMAND AND TELL IT HOW MANY
PAGES I'M PRINTING.
'OPTION 2
AcrDoc.PrintPages 0, 0, 1, True, True 'ONLY PRINTS FIRST PAGE WITH
THIS OPTION.
DoEvents
AcrDoc.Close True
DoEvents
Set AcrDoc = Nothing
DoEvents
End Sub
Private Sub CloseAcrobat()
AcrApp.CloseAllDocs
AcrApp.Exit
Set AcrApp = Nothing
DoEvents
End Sub
in PDF form then prints the reports after all client's reports have
been printed. The problem that I have run into is that when acrobat is
printing to my printer, I can get it to print only the first page of a
report(OPTION 1 BELOW) or it is spooled to the printer then deleted in
the print cue before it it printed (OPTION 2 BELOW).
It's been very frustrating trying to get these reports to print and
I've logged over 20 hours reading posts to see if anyone else was
having a similar problem. I'm using Acrobat 5 and an HP office jet
7130 printer. I have tried the DDE option of printing but it too has
some quirks that just are not acceptable.
Any help would be appreciated!
Chuck Reed
(e-mail address removed)
Option Explicit
Dim AcrDoc As CAcroAVDoc,AcrApp as CAcroApp,AcroPDDoc As CAcroPDDoc
Sub testprintpdf()
OpenAcrobat
PrintPDFDoc "G:\Weekly Reports\ReportTemp\2\1Daily.pdf"
CloseAcrobat
End Sub
Private Sub OpenAcrobat()
Set AcrApp = CreateObject("AcroExch.App")
AcrApp.Maximize 1
DoEvents
End Sub
Private Sub PrintPDFDoc(x As String)
Dim AcrDoc As CAcroAVDoc, lngPages As Long
Set AcrDoc = CreateObject("AcroExch.AVDoc")
AcrDoc.Open x, "PDF Print"
DoEvents
Set AcroPDDoc = AcrDoc.GetPDDoc
lngPages = AcroPDDoc.GetNumPages
'OPTION 1
AcrDoc.PrintPages 0, lngPages, 1, True, True 'HERE THE PRINT QUE
DELETES AFTER SPOOLING IF I USE THIS COMMAND AND TELL IT HOW MANY
PAGES I'M PRINTING.
'OPTION 2
AcrDoc.PrintPages 0, 0, 1, True, True 'ONLY PRINTS FIRST PAGE WITH
THIS OPTION.
DoEvents
AcrDoc.Close True
DoEvents
Set AcrDoc = Nothing
DoEvents
End Sub
Private Sub CloseAcrobat()
AcrApp.CloseAllDocs
AcrApp.Exit
Set AcrApp = Nothing
DoEvents
End Sub