![]() |
Using VBA to print to a PDF
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 |
Using VBA to print to a PDF
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. -- Regards, Tom Ogilvy "Steve" wrote in message ... 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 |
All times are GMT +1. The time now is 05:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com