Create PowerPoint Presentations Automatically using VBA

Share

Facebook
Twitter
LinkedIn

This is a guest post by Drew Kesler. 

You’ve been there before. It’s almost 5:00, and you are going crazy trying to finish the presentation due for a monthly performance meeting the next morning. The model is refreshed, and now it just takes a LOT of copying, pasting, and positioning to get the PowerPoint ready. Finally, the slides are finished…, until you read a new message from your boss requesting a minor change. But of course her change means you have to start all over with the copy and pastes…

There is always a better way! In the Oil and Gas industry, I constantly have monthly reports to assess the performance of our operating assets. Excel VBA makes it a cinch to automate the entire process. So when a simple change is requested, the presentation is automatically generated with the click of a button. No more wasting time!

So, here it is – How to Save TONS of Time by Using an Excel VBA Macro to Build Your Presentation:

1. Build your charts in Excel

2. Create a new worksheet and paste in all the charts you need for the presentation.
Excel to PowerPoint using VBA - Step 2

3. Open VBA. To do this, you can either press ALT + F11, or you can take the following steps:

a. To show the developer tab, click on the Microsoft Office Button and click Excel Options.
Excel to PowerPoint using VBA - Step 3a

b. Click Popular and then select the Show Developer tab in the Ribbon.
Excel to PowerPoint using VBA - Step 3b

c. Click on the Developer tab in the ribbon and click Visual Basic.
Excel to PowerPoint using VBA - Step 3c

4. In your VBA Editor window, click File => Insert => Module.
Excel to PowerPoint using VBA - Step 4

5. Paste the following code into the module (I included comments so you can customize it to your liking).
Excel to PowerPoint using VBA - Step 5

6. Click Tools => References.
Excel to PowerPoint using VBA - Step 6a

Add the Microsoft PowerPoint Library.
Excel to PowerPoint using VBA - Step 6b

7. Now all you need to do is go to Excel and run the CreatePowerPoint macro! To make this easy, draw a rectangle shape in your Excel worksheet which contains all the charts you want to export to PowerPoint.

Excel to PowerPoint using VBA - Step 7

8. Right click the rectangle and click Assign Macro.
Excel to PowerPoint using VBA - Step 8

9. Click on the CreatePowerPoint macro and press Okay.
Excel to PowerPoint using VBA - Step 9

10. That’s it! Just click your rectangle button then sit back and watch it run! You’ll have your presentation in no time!
Excel to PowerPoint using VBA - Step 10

Download the Example Workbook & Play with this Macro

Click here to download the example workbook and play with the macro.

Note: If you have an error with Power Point application activation, use this code instead.

AppActivate ("Microsoft PowerPoint")  <-- if this doesn't work

AppActivate "PowerPoint" <-- use this

Thanks Drew

Thank you so much Drew for writing this insightful article and showing us how to automate PPT Creation thru Excel VBA. I have really enjoyed playing this idea. And I am sure our readers will also like it.

If you like this technique, say thanks to Drew.

How do you Automate PPT Creation?

During my day job, I used to make a lot of presentations. But each one was different. So I used to spend hours crafting them.

And nowadays, I hardly make a presentation. But I know many of you make PPTs day in day out. And this technique presented by Drew is a very powerful way to save time.

Do you use macros to automate creation of presentations? What are your favorite tricks & ideas? Please share using comments.

Learn More VBA – Sign-up for our VBA Class Waiting List

Chandoo.org runs a VBA Class that teaches you from scratch, how to build macros to save time & automate your work. We opened our first batch in May this year and had an excellent response. More than 650 students signed up and are now learning VBA each day.

If you want to learn VBA & advanced Excel, this is a very good class to join.

Click here for full information on VBA classes.

About the Author:

Drew Kesler specializes in process automation and data visualization. He currently performs analytics and modeling for the Oil and Gas industry. His most recent projects include using GIS mapping technology to visualize data and enhance interaction across organizations.

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

5 Responses to “Show more of your workbook on screens [quick tip]”

  1. Bda75 says:

    In 2013 you can also add to the QAT the hidden command "Toggle Full Screen View".

  2. Chris Newman says:

    Instead of using the shortcut CTRL+F1, I prefer just to double-click one of the tab names (ie double-click the "Home" text on the Home tab) to enable the Ribbon Outline view. To return to the normal Ribbon state, just double-click your mouse again!

  3. liu says:

    press Ctrl+Shift+F1, you will get a full screen

  4. efand says:

    Instead of Ctrl + F1, I use Ctrl + Shift + F1 (Excel 2016)

  5. Jay says:

    Alt W E sequence for full screen
    ESC to get back

Leave a Reply