Macro Question with printing in MS Excel?

I'm admittedly not the best with writing macros. I've got a macro written that when you push a button, the set print area will print. What I'm trying to do is to specify where it prints to. I'd like it to print to PDF every time the button is clicked. But it seems like whatever the last selected printer is, it will print there.

Does anyone know how to specify a printer to print to within an excel macro?

2008-12-11T05:03:09Z

That's just it...this program isn't just for me. It's for a whole bunch of ppl. So having everyone's default printer as Adobe PDF would be more trouble than it's all worth. But anyways I found the specific coding I was looking for in a MS Office help forum.

Anonymous2008-12-10T19:35:00Z

Favorite Answer

If you have adobe acrobat installed, it will also install "Acrobat PDFWriter" option in the print menu. Make this the default printer. and try again.

?2016-10-25T13:09:36Z

To print, link a button to a macro, with this code contained in the macro ActiveWindow.SelectedSheets.PrintOut Copies:=a million, Collate:=genuine Edit: For some reason Yahoo truncates the textual content of my answer. The bit after "SelectedSheets" says "PrintOut" then an section before the note "Copies"