PDFCreator code

B

Brettjg

Hi, I'm using the following code. It works, but every now and then PDFCreator
is left running and fails the next time until I kill it through the task
manager. This is not very practical because I have massive macros that run
PdfCreator several times and then email out the pdf, so I get crashes.


Do Until pdfjob.cCountOfPrintjobs = 0
DoEvents
Loop
Application.Wait Now + TimeValue("0:0:10")

pdfjob.cClose
Set pdfjob = Nothing
Application.ActivePrinter = printer_memory

You'll note the huge wait time that I have to put in to restrict this problem.

Is there another way of killing the application first before using it again?
Thanks, Brett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top