Page 1 of 1

Posted: Wed Jun 18, 2008 11:25 am
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.

Posted: Wed Jun 18, 2008 11:50 am
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.