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