How do I monitor the printer?

A

aualias

Hi,

I have a batch of Word documents that are getting sent to the printer.

How do I verify that they have been successfully printed?
I would like to stop sending documents to the printer if the printer is
offline.

Do I have to use the Windows API to access the print spooler? (I am using
C# - I have not looked to see if there is a .NET wrapper for these
functions)

TIA

David
 
J

Jonathan West

Hi David

Karl Peterson has published an extensive set of class modules that allow you
to monitor just about anything to do with printers and print queues. Check
here

http://vb.mvps.org/samples/project.asp?id=PrnInfo

The code is written in VB, but much of it will import straight into VBA with
no difficulty.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
A

aualias

Thanks Karl,

I took a quick look at the code and it looks like he is using the API. I
suspected that was the best way to do this since Word sends the document off
to the printer and does not need any feedback - that is the job of the os.

So my answer is to use the API.... Word does not get any feedback from the
printer, and .NET does not seem to have a wrapper for the print spooler
functions.

David
 

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