Use Macros and Scripts in PowerPoint

Created: Thursday, November 8, 2007, posted by at 8:57 am

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)

This article is not about creating your own macros or scripts to automate PowerPoint. However, if you just want to run any macros or scripts that a friend or colleague shares, then you are on the right page. You can also get many scripts from our PowerPoint VBA Snippets page.

Follow these steps to get started:

  1. Make sure you have a script ready — you can download some scripts here.
  2. Open an existing presentation, or create a new one in PowerPoint. Then press Alt+F11 to access the Microsoft Visual Basic interface that you can see in Figure 1.
    Figure 1: The Visual Basic interface
  3. Choose the Insert | Module option, as shown in Figure 2.

    Figure 2: Insert a module
  4. This opens a new module window on the right side of the interface. Copy your VBA code source, and paste it here, as shown in Figure 3.

    Figure 3: The pasted script
  5. Now you need to run this script as a macro from within PowerPoint. To do that, first exit the Visual Basic interface by choosing the File | Close and Return to PowerPoint option.
  6. Now the steps you take differ depending on the version of PowerPoint you are using:
    Enable Developer Tab in the Ribbon in PowerPoint 2016 for Windows
    Enable Developer Tab in the Ribbon in PowerPoint 2013 for Windows
    Enable Developer Tab in the Ribbon in PowerPoint 2010 for Windows 
    Enable Developer Tab in the Ribbon in PowerPoint 2007 for Windows
  7. Once you have enabled the Developer tab of the Ribbon, access this tab and click the Macro button to bring up the Macro dialog box that you can see in Figure 4. All scripts within the active presentation will be displayed here. Select the script you want to run, and click the Run button.

    Figure 4: The Macro dialog boxVersions before PowerPoint 2007: Choose Tools | Macros | Macro option to bring up the same dialog box that you saw in Figure 4. Then select the script you want to run, and click the Run button.

Remember, some scripts may do nothing at all unless you have something selected on the slide before you run them!

Tip from Steve Rindsberg: You can store many, many macros/scripts/routines in a single PowerPoint file and as long as you have it open along with any other files, you can access the macros as described.

You May Also Like: Create an Add-in With Toolbars That Run Macros (PPT FAQ by Steve Rindsberg)

Related Posts

Filed Under: Techniques
Tagged as: , , ,

No Comments

Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.

Plagiarism will be detected by Copyscape

© 2000-2020, Geetesh Bajaj - All rights reserved.

since November 02, 2000