Solved

Batch Printing From VB App

Posted on 2003-12-01
14
1,003 Views
Last Modified: 2011-08-18
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.


0
Comment
Question by:bdbrown
  • 6
  • 6
  • 2
14 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9852102
0
 
LVL 2

Author Comment

by:bdbrown
ID: 9852163
It opens to a blank .xls?
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9852267
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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 2

Author Comment

by:bdbrown
ID: 9852479
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
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9852621
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 100 total points
ID: 9852634
This example is close to waht you need:
http://www.partware.com/ebooks/api/ref/e/enumjobs.html
0
 
LVL 2

Author Comment

by:bdbrown
ID: 9852703
Thank you Richie. It looks like what I want. I will try this later and get back to you. Thanks again!
bdb
0
 
LVL 2

Author Comment

by:bdbrown
ID: 9854398

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
 
LVL 2

Author Comment

by:bdbrown
ID: 9854983
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
 
LVL 2

Author Comment

by:bdbrown
ID: 9854991
I would take back the points if I could - I could use them for another question!
0
 

Expert Comment

by:flaouze
ID: 11874330
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
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 11874432
maybe i have them in my HD. Give me a e-mail.
0
 

Expert Comment

by:flaouze
ID: 11874926
oh that would be great !
my email is flaouze@yahoo.fr

Thanks in advance
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 11882328
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Macro which automatically sends attachment to Outlook 14 69
JSON Response and request in VB6 application 11 388
How does CurrentUser work? 10 36
MS Date Picker 64 bit 32 bit issue 12 53
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now