Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - How to discern printer status

Status
Not open for further replies.

glennho

IS-IT--Management
May 15, 2002
6
US
Hi -
Is there a way through VBA to find out what the status of the default printer is?
I've got code that defines print area -
Activesheet.PageSetup.PrintArea = Selection.Address
- it hangs if the default printer is not available (on a network, it can happen).
I can insert On Error Resume Next, but that's a cheap dodge - I'd like to at least let the user know that there was a problem that must now be manually solved.

The only printer reference I find in Excel VBA is Application.ActivePrinter, which returns or sets the name of a printer - there seem to be no further properties associated, and what I really want is the Status.
I found code for Word, but cannot get it to work in Excel.
Must work in WinXP/Win2k OfficeXP.

Any help would be GREATLY appreciated.
Thanks - gh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top