application.activeprinter and network device

  • Thread starter Thread starter Edwin Niemoller
  • Start date Start date
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:"
 
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
 
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
 
Back
Top