Ok people here have been an extremely great help.
I have a problem once again.. It was working fine but now is broke again.
I have a routine that loops through my reports and sends them to a printer or PDFCreator. Wierd thing is, my first report that has color on it, keeps coming out black and white.. Every other report that has color prints with its color.. I am so confused.
Here is the snippet of code that runs through the execution of the reports.
I have a problem once again.. It was working fine but now is broke again.
I have a routine that loops through my reports and sends them to a printer or PDFCreator. Wierd thing is, my first report that has color on it, keeps coming out black and white.. Every other report that has color prints with its color.. I am so confused.
Here is the snippet of code that runs through the execution of the reports.
Code:
'If option is print to PDF set default printer to PDFCreator and start PDFCreator
Set Application.Printer = Application.Printers("PDFCreator") 'Call to print to PDF Creator
'start PDFCreator
Set pdfjob = New clsPDFCreator
If pdfjob.cStart("/NoProcessingAtStartup") = False Then
Shell "taskkill /IM /T PDFCreator.exe", vbHide
End If
With pdfjob
.cPrinterStop = True
.cOption("UseAutoSave") = 1
.cOption("UseAutoSaveDirectory") = 1
.cOption("AutoSaveDirectory") = pdfpath
.cOption("AutoSaveFilename") = pdfname
.cOption("AutoSaveFormat") = 0 '0 = PDF
.cClearCache
'Determine if need to print out cover sheet and Table of Contents
If rt.RecordCount > 1 Then
DoCmd.OpenReport "mailto", acViewNormal
DoCmd.OpenReport "rpt1", acViewNormal
Sleep (1000)
End If
'Print out the reports in the batch
For pgA = 0 To rt.RecordCount - 1
' Set Application.Printer = Application.Printers("PDFCreator") 'Call to set printer to PDFCreator
RPT = "rpt" & Rprt(0, pgA)
DoCmd.OpenReport RPT, acViewNormal
Sleep (1000)
Next pgA
Comment