Convert Multiple Powerpoint Files into PDF with Excel VBA
This article shows how to batch convert Microsoft PowerPoint 2000, 2003, 2007 presentations into PDF file format using Excel VBA program. This is one of the common problem faced by professionals when clients expect files in PDF format and we have the files in PPTX format. It's easy to convert a single file in PDF but cumbersome to convert multiple files manually. In Microsoft Excel we can automate tasks via macro, that's what we will be discussing it in this post.
Prerequisites: MS Office Add-in: Save as PDF or XPS
This add-in is pre-installed in Office 2010 package. If this add-in is not installed on your computer, download it from the Microsoft site :Download Add-In
(If this link is not working, Google search on "Save as PDF or XPS MS Office" and you'll find the link working) 1. Convert the whole powerpoint file into PDF
The following program creates a PDF file of the whole powerpoint presentation from files in a folder.The PDF files are saved in the same directory where PPT files are stored. Enter the folder path in cell C3 as shown below :
How to use
Download the workbook and enter the folder path in cell C3. And then hit PDF Conversion button.
OR
1. Open Excel . Press Alt + F11 to open the visual basic editor.
2. Go to Tools >> References and check Microsoft Powerpoint Object library
3. Go to Insert >> Module to insert a new module.
4. Paste the above program into the module.
5. Mention the folder path in cell C3.
6. Press Alt + F8 , select "Converter" macro and hit Run button.
2. Convert the specified powerpoint slide into PDF The following program creates a PDF file of the specified powerpoint slide from presentations in a folder. It displays a prompt in a dialog box to enter the slide number.
How to use
Download the workbook and enter the folder path in cell C3. And then hitPDF Conversionbutton. After that it will prompt you to enter a slide number.
OR
1. Open Excel . Press Alt + F11 to open the visual basic editor.
2. Go to Tools >> References and check Microsoft Powerpoint Object library
3. Go to Insert >> Module to insert a new module.
4. Paste the above program into the module.
5. Mention the folder path in cell C3.
6. Press Alt + F8 , select "Converter" macro and hit Run button.
3. Convert each slide as a seperate PDF file
The following program creates a PDF file of each slide from the presentations in a folder.
How to use
Download the workbook and enter the folder path in cell C3. And then hitPDF Conversionbutton.
OR
1. Open Excel . Press Alt + F11 to open the visual basic editor.
2. Go to Tools >> References and check Microsoft Powerpoint Object library
3. Go to Insert >> Module to insert a new module.
4. Paste the above program into the module.
5. Mention the folder path in cell C3.
6. Press Alt + F8 , select "Converter" macro and hit Run button.
Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has over 10 years of experience in data science. During his tenure, he has worked with global clients in various domains like Banking, Insurance, Private Equity, Telecom and Human Resource.
While I love having friends who agree, I only learn from those who don't Let's Get Connected Email LinkedIn
12 Responses to "Convert Multiple Powerpoint Files into PDF with Excel VBA"
I really like the third strategy, but for some reason, the macro is only extracting and saving slides as PDF's for files that were modified with today's date. I've tested this multiple times - the macro opens all decks in my file path, but only converts the files that were modified today. Any suggestions on how to fix this?
To continue reading you need to turnoff adblocker and refresh the page. We rely on advertising to help fund our site. Please whitelist us if you enjoy our content.
Great article. thanks it was very helpful.
ReplyDeleteI really like the third strategy, but for some reason, the macro is only extracting and saving slides as PDF's for files that were modified with today's date. I've tested this multiple times - the macro opens all decks in my file path, but only converts the files that were modified today. Any suggestions on how to fix this?
ReplyDeleteThanks a ton..
ReplyDeleteuseful article, thank you!
ReplyDeleteSame as first strategy any possibilities to export it as excel instead of pdf
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAfter I use the code, the system prompts an error stating: 'Compile Error: User-defined type not defined'.
ReplyDeleteOption 3 is good one. Run the program also. Got successfully done. But unable to find PDF files. Please guide.
ReplyDeleteComo fazer para exportar em xls? por gentileza
ReplyDeleteplease how to convert to XML or XLS?
ReplyDeleteAppreciated thanks
ReplyDelete