Batch Printing From VB App

I want to know how I can tell when Acrobat Reader is finished sending a print job from within VB6 app. I am creating a batch printer program that loads Adobe Acrobat Reader and sends print jobs from within using - Shell "acrord32.exe /p /h <fileName>". I need to know when it is finished spooling the current print job before sending the next print job.


LVL 2
bdbrownAsked:
Who is Participating?
 
Richie_SimonettiIT OperationsCommented:
This example is close to waht you need:
http://www.partware.com/ebooks/api/ref/e/enumjobs.html
0
 
Richie_SimonettiIT OperationsCommented:
0
 
bdbrownAuthor Commented:
It opens to a blank .xls?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Richie_SimonettiIT OperationsCommented:
Yes, please push alt+F11 to see the code.
it uses Enumjobs to know when printer is "available" again. It works with default printer but it could be easily modified to work with any pr¡nter.
0
 
bdbrownAuthor Commented:
I know how to get the printers list and even set the default printer.
What I need to see when the spooler has recieved a specific PDF that was sent my my app. not just the number of print jobs in the que. The printer in on a network so other jobs could be added by other users and others may finish in the mean time. If the code I am looking for could return the document name and the owner it would be great.
I get an error error "User-define type not defined" when I run that code in VB6. "pDevMode As DEVMODE" What is DEVMODE?
0
 
Richie_SimonettiIT OperationsCommented:
0
 
bdbrownAuthor Commented:
Thank you Richie. It looks like what I want. I will try this later and get back to you. Thanks again!
bdb
0
 
bdbrownAuthor Commented:

Richie; The last link you sent was very helpful.
This is actual output from the code,

-There are 1 print jobs currently in the queue.
-Job ID number: 515
-Printed by user: bdb
-Number of pages:0
-Placed in queue on: 12-2-2003
-Placed in queue at: 0:22:14 GMT

I can surely use this information - thanks - you get the points!
bdb
0
 
bdbrownAuthor Commented:
Better than the above!!!

I found this on Microsoft website - it gives you everything you could possibly need.

http://support.microsoft.com/default.aspx?scid=kb;en-us;202480
0
 
bdbrownAuthor Commented:
I would take back the points if I could - I could use them for another question!
0
 
flaouzeCommented:
I just entered this discussion and I'm also very interested in the examples provided
Unfortunately the links mentioned are dead
Can anyone please tell me where to find this sample code?

I'm actually looking to batch print TXT document using a VB application.

Thanks
0
 
Richie_SimonettiIT OperationsCommented:
maybe i have them in my HD. Give me a e-mail.
0
 
flaouzeCommented:
oh that would be great !
my email is flaouze@yahoo.fr

Thanks in advance
0
 
Richie_SimonettiIT OperationsCommented:
I sent what a have.
Anyway, link http://support.microsoft.com/default.aspx?scid=kb;en-us;202480 is still alive. Check it out.
Cheers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.