I.m using v1.70. Printing to pdfCreator printer is fine but prinitng form vba access 2003 coed produces b&w report. Why? Are there any Options i'm missing?
My code :
Dim PDFCreator1 As Object, DefaultPrinter As String, c As Long, _
OutputFilename As String
Dim PdfDir As String, myf As Form
Set PDFCreator1 = CreateObject("PDFCreator.clsPDFCreator")
PdfDir = ApplicationPath & "\PDF\"
If Len(Trim(Dir(PdfDir, vbDirectory))) = 0 Then MkDir PdfDir
With PDFCreator1
.cStart "/NoProcessingAtStartup"
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = PdfDir
.cOption("AutosaveFilename") = Nz(VrniValidFileName(pdfFileName), RepName)
.cOption("AutosaveFormat") = 0
DefaultPrinter = .cDefaultprinter
.cDefaultprinter = "PDFCreator"
.cClearCache
If myFilter = "" Then _
DoCmd.OpenReport RepName, acViewNormal Else _
DoCmd.OpenReport RepName, acViewNormal, , myFilter
.cPrinterStop = False
End With
c = 0
Do While (PDFCreator1.cOutputfilename = "") And (c < (maxTime * 1000 / sleepTime))
c = c + 1
Sleep 200
Loop
OutputFilename = PDFCreator1.cOutputfilename