macro to change from Activeprinter to other printer

Sahak

Well-known Member
Joined
Nov 10, 2006
Messages
1,008
Office Version
  1. 2016
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Hi all,

To change from Activeprinter to other printer (without showing Print Dialog), we use for example macro code:
Code:
 Application.ActivePrinter = "Brother HL-2170W series on Ne04:"
Or
Code:
 Application.ActivePrinter = "HP LaserJet P2035n Design on Ne03:"
In first code printer name is “ Brother HL-2170W series” & in second code printer name is “ LaserJet P2035n Design”, it is understandable, they are printers names, but how, or from where we can get “Ne04 in first code & “Ne03 in second code ?
Thank you in advance.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Have a look at this which describes how to List Printers In VBA and how to select them
It does not answer your specific question but is a general solution to selecting printers
 
Upvote 0
Hi Yongle,

Thank you very much for reply.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top