Excel VBA and doPDF

You can ask general questions, share opinions or advices about doPDF.
Post Reply
Posts: 2
Joined: Wed Jun 18, 2008 4:20 am

Post by Candu »

I am very impressed with doPDF. I am adept at Excel & VBA macros but can't figure out if/how I can pre-populate the PDF filename in the pop-up box. Is this possible?
I am changing the printer to doPDF then running:
Sheets(Array("sheet1", "sheet4", "sheet6")).Select

ActiveWindow.SelectedSheets.PrintOut copies:=1, Collate:=True
This works fine but I'd like to populate the name field.

Claudiu (Softland)
Posts: 1560
Joined: Thu May 23, 2013 7:19 am

Post by Claudiu (Softland) »

Sorry but not from the code directly. Normally another parameter should set the name automatically, prtofilename:="c:\test.pdf", but since that also requires to set a path it's not supported (it would mean bypassing the save as window).
However, note that doPDF always prints the pdf with a filename that's actually the name of the opened workbook, so you'll simply have to name your workbook the way you want it shown in the PDF.

Follow us to stay updated:

Post Reply