Hey there, I'm a brand new PDFCreator user. I have an Access report that I'm exporting to PDF. My code produces a PDF just fine, it's just that it is in black and white. My Access report is in color and I need the resulting PDF to be in color as well. I found the following solution on the web but it hasn't proven successful:
Dim objAccess As Access.Application
Dim objPDFCreator As PDFCreator.clsPDFCreator
Set objAccess = New Access.Application
Set objPDFCreator = New PDFCreator.clsPDFCreator
With objPDFCreator
If .cStart("/NoProcessingAtStartup") = False Then
MsgBox "Can't initialize PDFCreator.", vbCritical + _
vbOKOnly, "PrtPDFCreator"
Exit Sub
End If
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = sPDFPath
.cOption("AutosaveFilename") = sPDFName
.cOption("AutosaveFormat") = 0 ' 0 = PDF
.cClearCache
End With
objAccess.DoCmd.OpenReport sReportName, acViewPreview
objAccess.Reports(0).Printer.ColorMode = acPRCMColor
I've excluded some code for the sake of brevity, my main point being the line in red. When I run the above code, the PDFCreator system tray icon appears with a red dot and the process runs indefinitely and produces no PDF document. It may be that the process takes an inordinately long time, but it runs so long that I assume something is wrong. Replacing the last two lines with:
objAccess.DoCmd.OpenReport sReportName
results in a PDFCreator system tray icon with a green dot that finishes pretty quickly and produces a B/W PDF.
Any help would be appreciated