Add print buttons for specific printers?

  • Thread starter Thread starter inaz
  • Start date Start date
I

inaz

I frequently print to different printers and I'd like to have differen
print buttons for specific printers so I don't have to always us
"Print.....".

Thanks guys
 
Hi Inaz

Sub Printtest()
Dim DPrinter As String
DPrinter = Application.ActivePrinter
Application.ActivePrinter = "hp officejet k series on Ne00:"
ActiveSheet.PrintOut Copies:=5
Application.ActivePrinter = DPrinter
End Sub

This macro you can assign to a button

To know the names of your printers
Change to it in the ctrl P dialog (Cancel after choose the printer ) and run
this so you know the name that you must use in the macros

Sub nameprinter()
MsgBox Application.ActivePrinter
End Sub

The PrintOut also have a ActivePrinter argument
I don't know if this will set it back to the old printer when it is done??
 
Don't know which print icon you have on your tool bar, but XL has two of
them, and they look exactly alike.

One simply prints to the active printer, while the other will present a drop
down box of all available printers, where you can simply click on your
choice of machine for each individual print job.

Right click in the toolbar, and choose "Customize".
Under the "Commands" tab, click "File" in the left window, then scroll down
in the right window until you see both print icons.

Since they look exactly alike, drag them both to your toolbar and see if
either one will satisfy what you're looking for.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

I frequently print to different printers and I'd like to have different
print buttons for specific printers so I don't have to always use
"Print.....".

Thanks guys!
 
Hi inaz

You may want to run this macro - it assumes that the "File" toolbar on the
Worksheet Menu Bar has not been customised in any way.

Sub test()
With Application.CommandBars("File")
..Reset
..Controls.Add Type:=msoControlButton, ID:=2521, Before:=15
End With
End Sub

Alternatively, place this in the "ThisWorkbook" module of your
"Personal.xls" file.

Private Sub Workbook_Open()
With Application.CommandBars("File")
..Reset
..Controls.Add Type:=msoControlButton, ID:=2521, Before:=15
End With
End Sub

--
XL2002
Regards

William

(e-mail address removed)

| I frequently print to different printers and I'd like to have different
| print buttons for specific printers so I don't have to always use
| "Print.....".
|
| Thanks guys!
|
|
| ---
| Message posted
|
 
Back
Top