User login

Who's online

There are currently 1 user and 104 guests online.

Online users

Advertisements


SourceForge.net Logo

PDF Creator hanging in Access

Submitted by Malhuine on Sun, 2008-02-03 15:55.

I am using the following code but Access seems to hang and flicker continuously until I kill it in task manager. Can someone advise what is wrong in the code? Thanks!

Public Sub PrintRep(RepName As String)
Dim PDFCreator1 As PDFCreator.clsPDFCreator, DefaultPrinter As String, c As Long, _
OutputFilename As String
Set PDFCreator1 = New clsPDFCreator
With PDFCreator1
.cStart "/NoProcessingAtStartup"
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = "C:\Program Files\Leaps And Bounds"
.cOption("AutosaveFilename") = RepName
.cOption("AutosaveFormat") = 0 ' 0 = PDF
DefaultPrinter = .cDefaultPrinter
.cDefaultPrinter = "PDFCreator"
.cClearCache
DoCmd.OpenReport RepName, acViewNormal
.cPrinterStop = False
End With

c = 0

Do While (PDFCreator1.cOutputFilename = "") And (c

© 2006 by pdfforge.org :: Contact us

Validate XHTML or CSS.