C
Corey
On our office network we share 2 network printers.
Each PC will have these listed as the same name, but each PC also has some
other printers listed.
I have a workbook each user uses, that when a macro runs, the 1st page is
sent to an OKI Printer, and page 2 is sent to HP printer.
The problem is that for some reason the printers on each PC move up and down
in the list, and do not stay in the Alphabetical list i placed them in.
If i record a macro in Excel to select each printer they are recorded like:
Sub PC2PrinterA() ' Printer Settings
Application.ActivePrinter = "AAA OKI C 5200 n on Ne02:"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1,
ActivePrinter:="AAA OKI C 5200 n on Ne02:"
Application.ActivePrinter = "AAA HP LaserJet 5000 Series PS on Ne01:"
ActiveWindow.SelectedSheets.PrintOut From:=2, To:=2, Copies:=1,
ActivePrinter:="AAA HP LaserJet 5000 Series PS on Ne01:"
End Sub
I placed the 'AAA' on the printer names to try to keep them in order
Alphabetically, but that does not work.
Is there a way to refer to the Printer by it's IP Address?
or
Is there a way to place each Printer name on a worksheet, and then to Search
for PART of the Printer's name (eg. OKI or HP) from the sheet cell to ensure
each of the sheets will print to each of the printers?
Each PC will have these listed as the same name, but each PC also has some
other printers listed.
I have a workbook each user uses, that when a macro runs, the 1st page is
sent to an OKI Printer, and page 2 is sent to HP printer.
The problem is that for some reason the printers on each PC move up and down
in the list, and do not stay in the Alphabetical list i placed them in.
If i record a macro in Excel to select each printer they are recorded like:
Sub PC2PrinterA() ' Printer Settings
Application.ActivePrinter = "AAA OKI C 5200 n on Ne02:"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1,
ActivePrinter:="AAA OKI C 5200 n on Ne02:"
Application.ActivePrinter = "AAA HP LaserJet 5000 Series PS on Ne01:"
ActiveWindow.SelectedSheets.PrintOut From:=2, To:=2, Copies:=1,
ActivePrinter:="AAA HP LaserJet 5000 Series PS on Ne01:"
End Sub
I placed the 'AAA' on the printer names to try to keep them in order
Alphabetically, but that does not work.
Is there a way to refer to the Printer by it's IP Address?
or
Is there a way to place each Printer name on a worksheet, and then to Search
for PART of the Printer's name (eg. OKI or HP) from the sheet cell to ensure
each of the sheets will print to each of the printers?