application.activeprinter and network device

E

Edwin Niemoller

Hello group,

My routine changes the active (network) printer in the routine and changes
it back after the print to the standard printer.

The problem is that if another user uses the routine it only works if the
specific printer is on Ne00: and Ne01 (The first 2 installed networks
printers).
I have tried to used the network share name only but without success,
apparently it needs the Ne.

Is there an easy way around this?

Thanks in advance



Application.ActivePrinter = "HP4050 Logo on Ne00:"
Print routine
Application.ActivePrinter = "HP4050 Blank Ne01:"
 
T

Tom Ogilvy

you can try
sName = Application.ActivePrinter
On error Resume Next
Application.ActivePrinter = "HP4050 Logo on Ne00:"
if err.number <> 0 then
Application.ActivePrinter = "HP4050 Logo on Ne01:"
err.clear
End if
On Error goto 0
Print routine
Application.ActivePrinter = sName
 
E

Edwin Niemoller

Tom Thanks,

A good handle to start with. Do you know is there's a way to browse the
collection of printers available to Excel?

Edwin
 

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