|
-
Sep 11th, 2003, 08:29 AM
#1
Thread Starter
Addicted Member
Pausing/Resuming Windows Print Queue
Does anyone know how (in VBA) to pause a print queue and then unpause it again?
I have an Excel macro that I need to pause the queue with, let a lot of jobs collect in the queue and then the last command sent by the macro is to resume the queue but I cannot for the life of me find the code.
Thanks,
Jim
-
Sep 11th, 2003, 09:07 AM
#2
I've found this little EventVB.dll file which has those options in which you can call on. The file itself can be downloaded from:
http://www.merrioncomputing.com/Download/index.htm
with a how to use it help guide here:
http://www.merrioncomputing.com/Even...iPrintJob.html
as well as the full source code here:
http://www.merrioncomputing.com/Even...tJob_CODE.html
-
Sep 11th, 2003, 10:04 AM
#3
Thread Starter
Addicted Member
In reading it, it looks like you can only pause an individual jobs but not an entire queue. Have you found this to be true?
Thanks,
Jim
-
Sep 11th, 2003, 10:08 AM
#4
I've never done this myself to be honest with you, but looking at the api's available I would think that you're right. You should be able to loop through each of the print jobs & pause them in one go though - maybe using the EnumJobs api call to do this:
http://www.mentalis.org/apilist/EnumJobs.shtml
-
Sep 11th, 2003, 10:12 AM
#5
Thread Starter
Addicted Member
I am starting to think that there are no easy native VBA functions to pause a windows spooler. (Equiv of Rt Clicking on a printer in the Printers Folder and select "Pause Printing". Thanks for the assistance.
-
Sep 11th, 2003, 10:42 AM
#6
Frenzied Member
Using the eventVB.dll, the class ApiPrinter has pause/resume functionality and the class ApiPrintJob ditto.
They are wrappers for the SetPrinter and SetJob API calls respectively.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|