I utilize a VBA macro to automate the printing of various documents to
a variety of different printers. Occasionally, the macro will hang if
the intended printer isn't available online at the time, either
because it is turned off, the computer to which it's attached is
turned off or because the computer from which I am printing isn't
attached to the network. Is it possible, using VBA, to check whether
or not a specific printer is online and in working order? Furthermore,
if it isn't, is it possible to "pause" the printer and print, in
effect, to a queue that can be resumed later when everything is up and
in working order? Thanks.

Re: Online Printers by Jonathan

Jonathan
Sat Oct 16 18:09:58 CDT 2004


"RBM" <anyone@hotmail.com> wrote in message
news:rdo2n0t40kagcmvgg8klejelkb7l05f951@4ax.com...
>I utilize a VBA macro to automate the printing of various documents to
> a variety of different printers. Occasionally, the macro will hang if
> the intended printer isn't available online at the time, either
> because it is turned off, the computer to which it's attached is
> turned off or because the computer from which I am printing isn't
> attached to the network. Is it possible, using VBA, to check whether
> or not a specific printer is online and in working order? Furthermore,
> if it isn't, is it possible to "pause" the printer and print, in
> effect, to a queue that can be resumed later when everything is up and
> in working order? Thanks.

Hi RBM,

Go to http://www.mvps.org/vb/samples.htm and download the PrnInfo.zip
sample. Within that sample is a CPrinInfo.cls class module that allows you
go check a large number of paramaters of a printer, including its status.

Although the code was written in and for VB5/6, it should import quite
happily into a Word VBA project.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


Re: Online Printers by RBM

RBM
Sun Oct 17 12:18:49 CDT 2004

Thanks. I'll get working on this.

On Sun, 17 Oct 2004 00:09:58 +0100, "Jonathan West" <jwest@mvps.org>
wrote:

>
>"RBM" <anyone@hotmail.com> wrote in message
>news:rdo2n0t40kagcmvgg8klejelkb7l05f951@4ax.com...
>>I utilize a VBA macro to automate the printing of various documents to
>> a variety of different printers. Occasionally, the macro will hang if
>> the intended printer isn't available online at the time, either
>> because it is turned off, the computer to which it's attached is
>> turned off or because the computer from which I am printing isn't
>> attached to the network. Is it possible, using VBA, to check whether
>> or not a specific printer is online and in working order? Furthermore,
>> if it isn't, is it possible to "pause" the printer and print, in
>> effect, to a queue that can be resumed later when everything is up and
>> in working order? Thanks.
>
>Hi RBM,
>
>Go to http://www.mvps.org/vb/samples.htm and download the PrnInfo.zip
>sample. Within that sample is a CPrinInfo.cls class module that allows you
>go check a large number of paramaters of a printer, including its status.
>
>Although the code was written in and for VB5/6, it should import quite
>happily into a Word VBA project.