I'm trying to record a macro that will automatically make a pdf so that I won't have to go to the print menu manually everytime. The pdf maker that I have is not my default printing option, but when I make the macro and assign it to a button it works fine because it takes me to the printer menu and lets me choose the printer and what to name it. But when I close the program and re-open it, then when I click on the button it just automatically uses the default printer and ends up printing, instead of letting me choose the pdf maker.
Does anyone know how I can get the macro to stop at the printer menu?
Hi Stretch90
Use the code:
ActiveWorkbook.PrintOut Copies:=1, ActivePrinter:="CutePdf at Xlf:"
if not sure the right name of the printer/pdf maker, then set it as default and then run this code
Debug.print Application.ActivePrinter
This code will open the printer dialog and allow you to select the printer of choice.
Sub Show_Printer_Dialog() Application.Dialogs(xlDialogPrint).Show End Sub
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks