I recorded a macro to print an excel sheet when the button is pressed. But I want to specify the printer that it automatically prints to rather than give the user a choice. I’m also printing to a PDF so is there a way I can choose where I print to?
This is what I have so far:
Sub Publish() ' ' Publish Macro ' Macro recorded 07/09/2010 ' ' Keyboard Shortcut: Ctrl+Shift+S ' ActiveWindow.SelectedSheets.PrintOut Copies:=1 End Sub
Application.ActivePrinter = "Printer Name"
on the line above the PrintOut command. This link gives more information on ActivePrinter, even though it is geared more for MS Word.