L
leerem
I need some assistance please with a network printer selection.
I use two network printers one colour the other non-colour and I need to
print documents to both printers at different times during the day. The two
printers are in different parts of the building. I currently use code to
designate the printer required, such as:
Application.ActivePrinter = "Colour Admin Office on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Colour Admin Office on Ne03:", Collate:=True
Application.ActivePrinter = "Lexmark E323 on Ne02:" ' reverts back to
non-colour
The problem I have is that for some reason unknown to myself the Printer
Name changes; for example from; "Colour Admin Office on Ne03 too "Colour
Admin Office on Ne05" which caused an error when the routine is run.
Without going down the route of asking the user to identify the Printer
every time, is there a way using VB, to identify the correct printer based on
the first part of the name? It only seems to be the last character that
changes each time.
Any help would be much appreciated
Regards Lee
I use two network printers one colour the other non-colour and I need to
print documents to both printers at different times during the day. The two
printers are in different parts of the building. I currently use code to
designate the printer required, such as:
Application.ActivePrinter = "Colour Admin Office on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Colour Admin Office on Ne03:", Collate:=True
Application.ActivePrinter = "Lexmark E323 on Ne02:" ' reverts back to
non-colour
The problem I have is that for some reason unknown to myself the Printer
Name changes; for example from; "Colour Admin Office on Ne03 too "Colour
Admin Office on Ne05" which caused an error when the routine is run.
Without going down the route of asking the user to identify the Printer
every time, is there a way using VB, to identify the correct printer based on
the first part of the name? It only seems to be the last character that
changes each time.
Any help would be much appreciated
Regards Lee