I am using Excel 2003.
I am trying to output a print area from my spreadsheet to a PDF file, but I
can't seem to find a way to automatically or even semi-automatically specify
the filename. I generate the path and filename in Excel.
I tried the PrintToFile option of the Printout method, but it wound up
prompting me to disable a font feature in Acrobat. I got cold feet at that
point because of the sensitivity to changing settings in my work
environment. I'm not sure PrintToFile would get me PDF anyway.
Since I couldn't find a way to automatically enter the filename, the
intention now is to use copy and paste when the Acrobat printer prompts for
a filename. I copy the range that includes the filename, and then start my
VBA routine. VBA opens up the Acrobat printer and prompts for a filename,
but the paste command is grayed out. I can paste it into a Word document,
but not into the filename box for the Acrobat printer.
Suggestions?

Signature
Gary Burton
Michael Bednarek - 17 Aug 2007 12:54 GMT
>I am using Excel 2003.
>
[quoted text clipped - 15 lines]
>
>Suggestions?
I suggest you use the PDFDistiller object (from the "Acrobat Distiller"
library (ACRODIST.EXE)) and its FileToPDF method. Some details at the
links in
<http://groups.google.com.au/group/comp.text.pdf/browse_frm/thread/36b7193f0f7e42
0e/2ed583c3c507e4a1?lnk=st&rnum=2&hl=en#2ed583c3c507e4a1>.
Alternatively, the free PDFCreator also provides a COM/OLE interface and
its distribution provides examples in VBA. It's what I use now.

Signature
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
Gary Burton - 24 Aug 2007 06:17 GMT
Thanks for your response!
It isn't a practical solution in my case because I am on a highly
controlled network and can't change either the software or the setting.
I found a way to print to a textbox, then copy from the textbox before I
launch the output routine. then I can patch the filename in.
>>I am using Excel 2003.
>>
[quoted text clipped - 26 lines]
> Alternatively, the free PDFCreator also provides a COM/OLE interface and
> its distribution provides examples in VBA. It's what I use now.