hi guys. From an excel file, can I do a vba code to convert all powerpoint files in the same folder as the excel file into pdf files? The only exception is if the powerpoint file name is "abc.pptx". thanks in advance!
hi guys. From an excel file, can I do a vba code to convert all powerpoint files in the same folder as the excel file into pdf files? The only exception is if the powerpoint file name is "abc.pptx". thanks in advance!
Thanks, if you have clicked on the * and added our rep.
If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".
"Contentment is not the fulfillment of what you want, but the realization of what you already have."
Tips & Tutorials I Compiled | How to Get Quick & Good Answers
Hi,
It took a little more work than I had anticipated. I was hoping to use the ExportAsFixedFormat method, which works fine when used in PowerPoint, but seems to generate runtime errors when controlling PowerPoint from Excel. Other users have experienced the same problem. In my research, I did not come across a solution.
Fortunately, I had success with the SaveAs Method, which has almost no options, and must save the entire file as pdf.
ExportAsFixedFormat Method reference: https://msdn.microsoft.com/en-us/lib.../ff746080.aspx
SaveAs Method reference: https://msdn.microsoft.com/en-us/lib.../ff746389.aspx
I used 'Late Binding' which requires no Library references, but requires that all PowerPoint constants be explicitly declared. 'Early Binding' vs. 'Late Binding' reference: http://peltiertech.com/Excel/EarlyLateBinding.html
The software was developed in Excel 2003 (which can NOT create pdf files, but simulates their creation). The software was successfully tested using 32 bit Excel 2010.
See the attached file which contains the following code in ordinary code module ModSavePptAsPdf:
LewisPlease Login or Register to view this content.
didn't think it would be so complicated. thank you very much for this, Lewis!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks