User login

Who's online

There are currently 0 users and 123 guests online.

Advertisements


SourceForge.net Logo

Using PDF Creator from MS Access

Submitted by jasonbeach on Thu, 2007-12-06 23:54.

I am wanting to output various reports from a MS Access database I have. I can print to the PDFCreator with no problem. My question is, is there a way to print two or more reports to one pdf file? Is the an object model for the pdfCreator class?

Thanks,
Jason

Submitted by dudley on Sun, 2008-06-08 15:58.

Here's the rest of the code:

'Now you need to wait until all the documents have been spooled to the PDFCreator.
'To do this, create a loop that waits until the spooled document count = the number of created documents

c = 0
Do Until (.cCountOfPrintjobs = intRptCounter) And (c is less than (maxTime * 1000 / sleepTime))
c = c + 1
Sleep 200
Loop
' Do Until .cCountOfPrintjobs = intRptCounter ' the variable you were using to keep track of number of documents
' Sleep 200
' Loop

'now add in the code to combine all the documents
.cCombineAll
'unstop the printer so it will create the batched report
.cPrinterStop = False

Do Until .cCountOfPrintjobs = 0
Sleep 200
Loop

'I'm trying to leave PDFCreator in its initial state, so it doesn't
'save the settings I set above - but it doesn't seem to work.
' If .cOption("UseAutosave") = 1 Then .cOption("UseAutosave") = 0

End With

With PDFCreator1
.cDefaultprinter = DefaultPrinter
Sleep 2000
.cClose
End With

Sleep 2000 ' Wait until PDFCreator is removed from memory

End Sub

-Dudley
Vista Business, Access 2003

© 2006 by pdfforge.org :: Contact us

Validate XHTML or CSS.