Automating Microsoft PowerPoint

Using Windows PowerShell to automate Microsoft PowerPoint may at first seem like a strange combination. For one thing, the people who are most skilled at using Windows PowerShell are not the ones you think of as being heavy PowerPoint users. But PowerPoint is often used by ITPros because we are frequently called upon to make presentations. These presentations may be for training purposes, or reports to management, or a presentation to a client.  Because Microsoft PowerPoint is so easy to use, with all of its built-in wizards and templates, you may wonder what advantages automation brings to the table.

Indeed, until this past week I had done little with the Microsoft PowerPoint automation model—for the exact reasons mentioned above. It seemed to take too much time, and there were not that many things I needed to do with PowerPoint beyond the simple creation of a basic slide deck.

Because I am the Microsoft Scripting Guy, I see hundreds of e-mails every week from people wanting to create scripts for various projects. During the past year or so, I have been seeing more and more questions from people who wanted to automate PowerPoint. Eventually, I had enough questions to create a Microsoft PowerPoint week on the TechNet Script Center.

What kinds of things can you do with the automation model? For starters, you can print out all of the PowerPoint Presentations that exist in a single folder (or multiple folders for that matter). This is useful, if you need hard copies of a series of related presentations, or if you wish to quickly produce training manuals for class. You can configure the style of print out as well.

You may wish to apply a new theme to all of the PowerPoint Presentations that exist in a folder. This is useful if you make the same presentation to different conferences. Each conference always creates its on template, and this template must be applied to all of the presentations. By using a script, you can simplify this process. Or perhaps, your company has changed its name, or its logo. If your presentations adhere to a corporate template or theme that contains the name and logo, you can quickly update all of the existing presentations to the new style.

Maybe you simply need to add a new slide to an existing deck, or you wish to add custom slides to specific PowerPoint presentations. This also can be easily accomplished using Windows PowerShell and the Microsoft PowerPoint automation model. In fact, the last script I wrote for the PowerPoint week on the Script Center, read a text file that contained the names of a number of different customers, and the dates of the presentations. It then created customized presentations for each of the customers in the text file; that script was very powerful, and is just beginning to scratch the surface of what you can do with Windows PowerShell and the Microsoft PowerPoint automation model.

This does not even mention the fact that it is fun. Check it out, these are just some ideas of the kinds of things you can do.

Skip to main content