Using VBA to print to a PDF

S

Steve

I realy need some help here, I posted this yesterday but
got no response.

I would like to print to a PDF file from xl. When I hit
print it asks for a name to save the PDF file to. I have
about 100 pages that I will be doing this for, I don't
want to have to type in each page name.

how do I, using vba, tell xl what to name the PDF file.

Thanks
steve
 
T

Tom Ogilvy

A previouls posting by Keith:
A low-tech solution that also works is to use the distiller instead of the
adobe printer. (record a macro to grab the appropriate code). The distiller
does not pop up a dialog window. However, it saves your file to the
distiller directory, with the same name as the source Excel file. What I
did was put in a 10-sec delay in my VBA to allow distiller to process the
file, then used VBA to rename the file (and relocate it to my desired
directory).

Low tech, but very effective.

--------
And by Brian Webb
I had a similar problem with Word recently. I switched
the ActivePrinter to "Acrobat Distiller" and had more luck.
It kept wanting to save everything to "it's" directory, but
you can add a new printer port as type "PDF Port" and
set a different destination directory that way. I spent
hours trying to get PDFWriter to work from VB, so I know
where you're coming from.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top