• PRO Courses Guides New Tech Help Pro Expert Videos About wikiHow Pro Upgrade Sign In
  • EDIT Edit this Article
  • EXPLORE Tech Help Pro About Us Random Article Quizzes Request a New Article Community Dashboard This Or That Game Happiness Hub Popular Categories Arts and Entertainment Artwork Books Movies Computers and Electronics Computers Phone Skills Technology Hacks Health Men's Health Mental Health Women's Health Relationships Dating Love Relationship Issues Hobbies and Crafts Crafts Drawing Games Education & Communication Communication Skills Personal Development Studying Personal Care and Style Fashion Hair Care Personal Hygiene Youth Personal Care School Stuff Dating All Categories Arts and Entertainment Finance and Business Home and Garden Relationship Quizzes Cars & Other Vehicles Food and Entertaining Personal Care and Style Sports and Fitness Computers and Electronics Health Pets and Animals Travel Education & Communication Hobbies and Crafts Philosophy and Religion Work World Family Life Holidays and Traditions Relationships Youth
  • Browse Articles
  • Learn Something New
  • Quizzes Hot
  • Happiness Hub
  • This Or That Game
  • Train Your Brain
  • Explore More
  • Support wikiHow
  • About wikiHow
  • Log in / Sign up
  • Computers and Electronics
  • Presentation Software
  • PowerPoint Insertions

How to Enable Macros in PowerPoint

Last Updated: August 22, 2022

This article was co-authored by wikiHow staff writer, Darlene Antonelli, MA . Darlene Antonelli is a Technology Writer and Editor for wikiHow. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 42,780 times. Learn more...

A macro is a series of commands that automates repeated tasks, like applying formatting to shapes and text. Since macros also have the potential to run potentially-dangerous code, they are usually disabled for security reasons. This wikiHow will teach you how to enable macros in PowerPoint on your PC or Mac.

Step 1 Open PowerPoint.

  • If you're opening a project that has macros, you'll see a yellow banner asking you to enable them. Click Enable Content to enable macros.
  • This method only enables macros for the open PowerPoint, so you'll have to repeat the process for every PowerPoint project that you want to enable macros with.

Step 2 Click File.

  • Click Disable all macros with a notification to be able to enable each macro individually. Since macros can run potentially harmful code, you'll most likely want to use this setting if you don't completely trust where your macros came from.
  • Disable all macros except digitally signed macros will give you a security warning next to each disabled macro, except those that were created by and digitally signed by a trusted publisher. If you have not trusted the publisher in PowerPoint, you'll be prompted to do so.
  • Click Trust access to the VBA project object model if you have macros designed to work with VBA.

Step 8 Click OK twice.

Expert Q&A

You might also like.

Edit a PowerPoint Template

  • ↑ https://support.microsoft.com/en-us/office/enable-or-disable-macros-in-office-files-12b036fd-d140-4e74-b45e-16fed1a7e5c6#__toc311698312

About This Article

Darlene Antonelli, MA

1. Open PowerPoint. 2. Click File . 3. Click Options . 4. Click Trust Center . 5. Click Trust Center Settings . 6. Click Macro Settings . 7. Click Enable all macros . 8. Click OK twice. Did this summary help you? Yes No

  • Send fan mail to authors

Is this article up to date?

Do I Have a Dirty Mind Quiz

Featured Articles

Protect Yourself from Predators (for Kids)

Trending Articles

Reading Women’s Body Language: Signs & Signals That She’s Flirting

Watch Articles

Wear a Headband

  • Terms of Use
  • Privacy Policy
  • Do Not Sell or Share My Info
  • Not Selling Info

wikiHow Tech Help:

Tech troubles got you down? We've got the tips you need

What Is a Macro-Enabled PowerPoint Presentation?

A macro-enabled PowerPoint presentation is a presentation that uses macros. Microsoft Office 2007 began to implement security enhancements to protect against malicious threats, including offering two file types in PowerPoint presentations: .pptx and .pptm. To effectively implement them, users need to understand security risks associated with macros, how to change PowerPoint macro settings and how to save a presentation that contains macros.

Advertisement

Video of the Day

All Microsoft Office programs use macros to automate routine tasks, such as applying formatting to shapes and text, inserting drawing images and switching printers. Essentially, a macro takes a series of tasks and compiles them. This enables you to perform a complex task or complete numerous steps with just one button click or keyboard command. PowerPoint also uses macros to complete tasks while running the presentation, such as opening other presentations, moving to different slides based on audience questions or running a video.

Macros Security Risks

Macros are executable files. Executables can contain malicious code that can harm your computer. Since a hacker can insert destructive code or introduce a computer virus, you should only run macros from trusted sources. Trusted sources include developers from your organization or macros and add-ins available for download in Microsoft's official Downloads Marketplace at Office.com.

Macro Settings

When you open a presentation that contains macros, a yellow bar appears at the top of your screen. Click the "Enable Macros" button on the yellow bar to enable the macros for that session. To change global macro settings within PowerPoint, click "Backstage View" on the "File" tab. "Backstage" view is only available if the yellow message bar is active. If the message bar is not active, choose "Options" from the "File" tab and select "Trust Center." Choose to "Disable All Macros Without Notification," "Disable All Macros With Notification," "Disable All Macros Except Digitally Signed Macros" or "Enable All Macros (Not Recommended; Potentially Unsafe Code Can Run.)"

Saving Macro-Enabled Presentations

In order to save a macro-enabled presentation, you need to change the file extension. The standard file extension, .pptx, will not allow you to save any presentation that has VBA code associated with it. To change the file extension, select "Save As" from the "File" tab. Navigate to the location where you want to save the presentation and provide a presentation name. Select "PowerPoint Macro-Enabled Presentation" from the "Save As Type" drop-down menu and click "Save."

powerpoint presentation macro enabled

  • Presentation

What Is a Macro-Enabled PowerPoint Presentation?

Picture of onliner content creation team

  • December 10, 2022

powerpoint macro enabled presentation

PowerPoint presentations have long been a staple in business, education, and communication. They allow users to create visually engaging slides and deliver impactful messages. However, a concealed gem within PowerPoint can take your slideshows to a new level of effectiveness and interactivity: the Macro-Enabled PowerPoint Presentation.

In this article, we will share with you what PowerPoint macro enabled presentation is, how to enable macros in PowerPoint and the abundant advantages of utilizing this option to improve PowerPoint presentation design services .

how to enable macros in powerpoint

Table of Contents

What Is a PowerPoint Macro Enabled Presentation?

A PowerPoint macro enabled presentation is a file format that allows users to embed small programs called “macros” within their slides. Macros are sets of instructions or code written in Visual Basic for Applications (VBA) that automate repetitive tasks, add interactivity, and enhance functionality within the presentation. Users can perform complex actions, trigger animations, create custom interactive elements, and streamline various presentation processes by enabling macros.

How to Enable Macros in PowerPoint?

Before diving into the benefits of using macro-enabled PowerPoint presentations, let’s first understand how to enable macros in PowerPoint:

Open PowerPoint. you’ll find this on your start menu in home windows or inside the programs folder in Finder for Mac.

If you’re starting a project that has macros, you will see a yellow banner asking you to enable them. click on permit content to enable macros. This technique only enables macros for the open PowerPoint, so you’ll repeat the manner for each PowerPoint venture that you want to enable macros with.

  • Click on the document. it’s in the editing ribbon above your workspace.
  • Click on options. you will see this is the last option within the menu on the left side of the display.
  • Click on trust middle. that is at the lowest of the menu within the window that pops up.
  • Click accept as true with center Settings. you will see this at the right aspect of the window underneath the header, “Microsoft PowerPoint believe middle.”
  • Click on Macro Settings. it’s near the center of the menu at the left facet of the window.
  • Click on permit all macros. Use this most effectively in case you agree with the supply of your macros on account that they could run doubtlessly risky code. in any other case, use a one-of-a-kind putting right here.
  • Click on Disable all macros with a notification to permit each macro individually. given that macros can run potentially harmful code, you may most probably want to use this putting in case you don’t agree with wherein your macros came from.
  • Disable all macros except digitally signed macros will come up with a safety warning after each disabled macro, except those that have been created with the aid of and digitally signed through a trusted publisher. 
  • If you have now not depended on the writer in PowerPoint, you’ll be prompted to achieve this.
  • Click accept as true with access to the VBA undertaking item version if you have macros designed to work with VBA.
  • Click on ok twice. They believe middle home windows will close and you will now be able to use any macros in PowerPoint displays.

How to Disable or Enable Macros in PowerPoint, Word & Excel?

Whilst you could easily allow macros for numerous macro-enabled files via truly clicking at the prompt that commonly suggests up, you may in addition personalize your macro settings in PowerPoint, phrase & Excel (2016) by going to; file –> options –> believe center –> accept as true with center Settings-> Macro Settings. From here, you can permit or disable macros and even allow them most effectively for digitally signed documents.

Benefits of Using Macro Enabled PowerPoint Presentations

Here are some benefits of using macroenabled powerpoint presentations:

  • Automation and Time-Saving: Macros automate repetitive tasks, such as formatting, slide transitions, and animations, saving valuable time and effort.
  • Interactivity: Macros enable the creation of interactive elements, such as clickable buttons, quizzes, and user-driven navigation, making presentations more engaging.
  • Customization: With macros, users can tailor their presentations to specific audiences and create personalized experiences.
  • Consistency: Macros ensure uniformity across slides, minimizing errors and maintaining a cohesive presentation.
  • Complex Actions: Macros can execute complex actions, such as data processing, calculations, and dynamic content generation.
  • Efficient Data Handling: Macros facilitate handling large datasets and automated information updates.
  • Interactive Games and Simulations: Macros can transform presentations into interactive games, simulations, or educational tools.
  • Dynamic Charts and Graphs: Macros allow real-time updates and dynamic visualizations of data.
  • Enhanced User Experience: Interactive macros enhance the audience’s experience and improve information retention.

How to Create Your Macros in PowerPoint, Excel & Word?

Here is a manual on how you could create your macros in PowerPoint, phrase & Excel. even as macro-enabled documents require an understanding of VBA, we’ve got attempted to provide a less difficult technique for each utility using explaining the macro recording functionality which could assist even newbie users to automate their repetitive duties.

Microsoft PowerPoint

Macros in PowerPoint may be created by starting the system (in PowerPoint 2016) via View –> Macros. however, you will require programming knowledge and talent in VBA to create macros in PowerPoint. here’s a small manual regarding using the Macro recording device for PowerPoint, which existed in advanced versions and allow you to create macro-enabled documents which might be usable with newer editions.

how to enable macros in powerpoint

Microsoft Excel

At the same time as there is no smooth way for a non-programmer to create macro-enabled files for PowerPoint built-int, the task is a good deal simpler integrated into Microsoft Excel. there’s a macro recorder to document repetitive tasks. you may try this (built-in Excel 2016) with the aid of go built-ing to View –> Macros –> file Macro. this will document all of the obligations you carry out from there onward. once you are built-finished with the assignment, go to View –> Macros –> forestall Record integrated to forestall the record building system. you may run your macro from the Macros menu whenever to carry out the recorded function.

Microsoft Word

Fortunately, you can record macros in Word using a macro recording tool similar to the one in Excel. You can access this tool (in Word 2016) via View –> Record Macro. This will allow you to record certain tasks that you can repeat by simply running your saved macros.

PowerPoint Macro enabled presentations are a game-changer, revolutionizing how we create and deliver content. By incorporating macros, users can unlock the true potential of PowerPoint, turning static slides into dynamic and interactive experiences. Accepting the potency of automation and interactivity, PowerPoint macro enabled presentations authorize presenters to participate in their audience, give complicated facts easily, and leave a lasting effect. So, next time you build a PowerPoint presentation, contemplate harnessing the potency of macros to raise your storytelling and fascinate your spectators like never before.

What are the differences between PowerPoint presentation and PowerPoint macro-enabled presentation?

Files with PPTM extension are Macro-enabled Presentation files developed with Microsoft PowerPoint 2007 or higher models. They’re lookalike at PPTX files with the disagreement that the lateral can’t destroy macros though they can acquire macros.

What is a PowerPoint macro-enabled template?

Macro-Enabled Office documents enable you to automate frequently-used assigned tasks. A few templates come with Macros, and they have been developed with VBA. From the posts listed in this allotment, you might learn about the usefulness and use of macros and how they can improve your documents.

How to Become a Motion Graphic Designer

  • Graphic Design , UI-UX

How to Become a Motion Graphic Designer?

Lean UX Process

A Brief Overview of Lean UX

UX Strategy

UX Strategy and Its Components

you'r more than welcome

7 days a week, 9:30 AM – 5:30 PM

contact info

[email protected] +971581974748

  • LB07129, Jebel Ali Freezone, Dubai, UAE

Got a Project?

We’re a team of creatives who are excited about unique ideas and help companies to create amazing identity by offering wide range of digital services

© 2021 All rights reserved.

Be the first one who knows about updates!

enter your email address 📩

Welcome to the club 🎉.

From now on, Temis will inform you of its most valuable content and offers. You can also subscribe to this list at the moment. We will also protect your privacy

Byte Bite Bit

How to Enable Macros in PowerPoint: A Step-by-Step Guide

Enabling macros in PowerPoint can seem a bit daunting for beginners, but it’s actually quite straightforward. When I first started dabbling with macros, I found myself constantly toggling between different settings without a clear path. To enable macros, simply head to the Trust Center settings and adjust the Macro Settings to your preference. Trust me, once you get the hang of it, your workflow will become significantly smoother.

How to Enable Macros in PowerPoint: A Step-by-Step Guide

In my experience, dealing with the Trust Center in PowerPoint is crucial for enabling macros. Clicking through various tabs can feel like navigating a maze, but stay patient. You just need to access the Trust Center, click on Trust Center Settings, navigate to Macro Settings, and make the necessary adjustments. Pay close attention to the security implications and choose the setting that best fits your needs.

Automating tasks with macros can save you loads of time and repetitive effort. When I first discovered the power of these small scripts, I couldn’t believe how much more efficient my presentations became. So, roll up your sleeves, dive into the Trust Center, and start harnessing the power of macros in PowerPoint today!

  • 1.1 Accessing the Trust Center Settings
  • 1.2 Enabling Macro Functionality
  • 1.3 Understanding Developer Tab Options
  • 2.1 Writing Your First Macro Code
  • 2.2 Using the VBA Editor Effectively
  • 2.3 Saving and Closing Macro-Enabled Presentations
  • 3.1 Configuring Macro Security Settings
  • 3.2 Handling Potentially Dangerous Code
  • 4.1 Automating Common Tasks
  • 4.2 Creating Interactive Presentations

Setting up Macros in PowerPoint

Enabling macros in PowerPoint is crucial to automate repetitive tasks and enhance functionality. This process involves accessing specific settings in PowerPoint and configuring the macro options to suit your needs.

Accessing the Trust Center Settings

To begin, open PowerPoint and click on the File tab. This is located at the top left corner of the screen.

In the backstage view, select “Options” from the menu on the left. The PowerPoint Options window will appear.

Within this window, find and click on Trust Center . This section houses all the security and privacy settings for PowerPoint.

Next, click on Trust Center Settings . This will open a new dialog box where you can access various security options, including those for macros.

Enabling Macro Functionality

In the Trust Center Settings dialog, locate and select Macro Settings on the left side. Here, you have several options:

  • Disable all macros without notification : This setting is the most restrictive.
  • Disable all macros with notification : This option allows you to enable macros on a case-by-case basis.
  • Disable all macros except digitally signed macros : This option ensures only trusted macros run.
  • Enable all macros : This is the least restrictive setting but may pose security risks.

Choose the setting that best fits your security needs and click OK to apply.

Understanding Developer Tab Options

To fully access and utilize macros, enabling the Developer tab is essential. Go back to the File tab and select Options .

In the PowerPoint Options dialog, click on Customize Ribbon . On the right, check the box next to Developer to add it to your ribbon.

Once the Developer tab is visible, you can access various tools including the Macro button. This button allows you to record, run, and manage your macros, facilitating advanced PowerPoint functionality.

Creating and Managing Macros

Creating and managing macros in PowerPoint involves writing VBA code, efficiently using the VBA Editor, and saving presentations with macros enabled. These tasks help automate repetitive tasks and enhance presentation functionalities.

Writing Your First Macro Code

Writing your first macro in PowerPoint might feel like diving into uncharted waters, but it’s manageable with a step-by-step approach. First, go to the View tab and select Macros . Click Record Macro and provide a name for your macro. This name should be clear and descriptive, like “HighlightText”.

After naming the macro, start recording your actions. For example, if you want to change the font color of selected text, select the text, apply the desired changes, and then stop recording. Your actions are now saved as VBA code.

To view or edit this code, press Alt + F11 to open the Visual Basic for Applications (VBA) Editor. Here, you’ll find the recorded code and you can modify it if needed.

Using the VBA Editor Effectively

The VBA Editor is where the magic happens. Familiarizing yourself with this tool maximizes your productivity. When you open the editor, you’ll see the Project Explorer on the left. This window lists all open projects and their components.

Next, the Code Window is where you’ll write or edit VBA code. I often use the Immediate Window for quick testing of code snippets. You can enable it by selecting View > Immediate Window .

A key feature in the VBA Editor is Intellisense , which offers suggestions for code completion. It reduces errors and speeds up coding. Don’t hesitate to use the Object Browser by pressing F2 . It’s invaluable for exploring available properties, methods, and events.

Project Explorer Code Window Immediate Window

Saving and Closing Macro-Enabled Presentations

Once your macros are ready, saving the presentation correctly ensures they function as intended. When saving a macro-enabled presentation, select File > Save As . In the Save as type dropdown, choose PowerPoint Macro-Enabled Presentation (*.pptm) . This format retains the macros.

To close a macro-enabled presentation, just save your changes and exit PowerPoint. Ensuring macros are enabled in the Trust Center can prevent issues from arising. You can do this by going to File > Options > Trust Center > Trust Center Settings > Macro Settings .

Remember, macros add powerful functionality but can also pose security risks. Always verify the source of macro-enabled files before enabling their content.

Macro Security and Best Practices

When working with macros in PowerPoint, it’s crucial to think about security. It’s important to configure your settings properly and handle any potentially dangerous code with care.

Configuring Macro Security Settings

To secure your device , begin by opening PowerPoint and navigating to the Trust Center Settings . You can find this under the File tab by selecting Options , then Trust Center , and finally Trust Center Settings .

Within the Trust Center:

  • Macro Settings : You can choose to disable all macros, enable all macros with a security warning, or only enable macros from trusted locations.
  • Trusted Documents : Documents that you mark as trusted will bypass macro security warnings.
  • Trusted Publishers : Enable macros only from verified and trusted sources.

These settings help to mitigate security risks by controlling the execution of potentially harmful code. It’s essential to find a balance between functionality and protecting your data from viruses and malware .

Prevents all macro execution. Best for maximum security.
Prompts user before running macros. Good balance of security and usability.
Allows all macro execution. Only if necessary.

Handling Potentially Dangerous Code

Macros can pose significant security risks if they contain viruses or malware . Always exercise caution, especially when dealing with macros from unknown sources.

Steps to mitigate risks:

  • Security Warnings : Pay attention to any yellow security warning that appears when opening a document. This warning indicates potentially dangerous content.
  • Trust Access to the VBA Project Object Model : This setting allows macros to interact with the VBA model. Keep it disabled unless absolutely necessary.
  • Unblocking Files : If you trust the source, you can unblock a macro-enabled file by right-clicking the file, selecting Properties , and checking the Unblock box.

Using trusted locations and trusted publishers can also help, as these settings ensure that only verified macros are allowed to run. Keeping vigilant and updating your settings regularly can help secure your device against any malicious threats.

Advanced Macro Techniques in PowerPoint

Mastering advanced macro techniques in PowerPoint can significantly enhance productivity and interactivity. Let’s break down some expert strategies for automating common tasks and creating interactive presentations.

Automating Common Tasks

Automating various tasks in PowerPoint using macros can be a game-changer. I’ve used VBA (Visual Basic for Applications) to automate repetitive actions like aligning shapes or formatting slides. Imagine you need to standardize the size and position of all logos in a presentation. A simple macro, leveraging the ShapeRange object, can handle this efficiently.

For instance, I noticed that setting up a template with specific styles can help enormously. When you reuse it across different sessions, the macro applies these settings quickly. You save time: no more manually adjusting the same elements slide after slide.

Adding macros to the Quick Access Toolbar is another trick. It’s super handy – I just need a click to run a script that counts the number of slides or moves shapes into pre-set positions.

Creating Interactive Presentations

Creating interactive presentations using macros enhances the user experience. I often embed macros to allow users to navigate through content dynamically. For instance, using interactive buttons that, when clicked, reveal additional information or navigate to different sections of the presentation.

Another powerful technique involves the ActiveWindow.Selection object. Through this, I’ve set up presentations where clicking a shape triggers animations or opens other slides. This method makes presentations more engaging and interactive.

When working on Macs or PCs, I always ensure compatibility by checking preferences. Simple VBA scripts can be written to adapt functionalities across different platforms, ensuring everyone has the same interactive experience.

Using macros strategically can indeed supercharge your PowerPoint presentations, turning them into dynamic, professional-looking projects.

Related posts:

  • How to Save PowerPoint as Video: Step-by-Step Guide for Beginners
  • How to Add Notes to PowerPoint: A Step-by-Step Guide for Enhanced Presentations
  • How to Edit Background Graphics in PowerPoint: Step-by-Step Guide for Effective Presentations
  • How to Track Changes in PowerPoint: A Step-by-Step Guide
  • How to Create Master Slides in PowerPoint: Easy Guide for Professionals
  • How to Compress Media in PowerPoint: Enhancing Performance and Quality
  • How to Change Footer in PowerPoint: A Step-by-Step Guide
  • How to Add Multiple Animations to One Object in PowerPoint: Step-by-Step Guide
  • What Is Microsoft PowerPoint Used For? Discover Its Essential Applications
  • How to Lock Aspect Ratio in PowerPoint: A Step-by-Step Guide
  • What is an ODP File PowerPoint: Understanding OpenDocument Presentation
  • How to Change the Design of One Slide in PowerPoint: A Step-by-Step Guide

Leave a Comment Cancel reply

Save my name, email, and website in this browser for the next time I comment.

How to Enable Macros in PowerPoint: A Step-by-Step Guide

  • Recent Posts
  • MySQL No Database Selected: Actionable Tips to Fix the Error - July 12, 2024
  • How to Un-Snooze Email in Outlook: A Step-by-Step Guide - July 12, 2024
  • How to Search Outlook for Multiple Words: Boost Your Efficiency - July 12, 2024

Enabling macros in PowerPoint is an essential function that allows users to automate tasks and increase efficiency. Macros are a set of instructions that automate repetitive tasks, saving valuable time and effort. However, the process of enabling macros in PowerPoint can be confusing for some users. In this article, I will provide step-by-step instructions on how to enable macros in PowerPoint and ensure security while doing so.

A computer screen with a PowerPoint window open. A cursor hovers over the "File" tab, then clicks "Options." In the Options window, the cursor selects "Trust Center" and then "Trust Center Settings." Finally, the cursor clicks on

To begin, you need to access the macro settings within PowerPoint. Click on the “File” tab and select “Options” from the drop-down menu. In the “PowerPoint Options” window, select “Trust Center” from the left-hand menu, and then click on the “Trust Center Settings” button. From here, you can access the “Macro Settings” option and adjust the security settings to enable macros.

It’s important to note that enabling macros can pose a security risk, as they can be used to execute malicious code. Therefore, it’s crucial to follow the steps carefully and ensure that you trust the source of the macro before enabling it. By following these steps, you can safely enable macros in PowerPoint and increase your productivity.

JUMP TO TOPIC

Understanding Macro Security Settings

Steps to enable macros, creating and editing macros, vba project and code management, saving and sharing presentations with macros, security considerations, utilizing macros for interactivity and efficiency, best practices for macro usage, enabling macros in powerpoint.

A computer screen with a PowerPoint window open, displaying the "Enable Macros" prompt. A mouse cursor hovers over the "Enable Macros" button

Enabling macros in PowerPoint is a straightforward process that requires a few simple steps. Before enabling macros, it is important to understand the security settings that come with it.

Macros are scripts that automate repetitive tasks in PowerPoint. However, they can also be used as a tool for cybercriminals to infect your computer with malware. For this reason, Microsoft has implemented several security measures to protect users.

By default, PowerPoint disables all macros to prevent potential security risks. However, you can adjust the security settings to enable macros. There are three levels of macro security settings in PowerPoint:

  • Disable all macros without notification
  • Disable all macros with notification
  • Enable all macros (not recommended)

The first option disables all macros without any notification, while the second option disables all macros but prompts the user with a notification before enabling any macros. The third option enables all macros without any notification, which is not recommended due to the potential security risks.

To enable macros in PowerPoint, follow these steps:

  • Open PowerPoint and click on the “File” tab.
  • Select “Options” from the left-hand pane.
  • Click on “Trust Center” and then click on “Trust Center Settings.”
  • In the Trust Center window, click on “Macro Settings.”
  • Select the option that best suits your needs. For example, if you want to enable all macros with notification, select “Disable all macros with notification.”
  • Click “OK” to save your changes and exit the Trust Center window.

Once you have enabled macros, you can access them through the Developer tab. To access the Developer tab, click on “File” and then select “Options.” In the Options window, click on “Customize Ribbon” and check the box next to “Developer.” Click “OK” to save your changes.

From the Developer tab, you can access the Macro dialog box to create, edit, and run macros. Keep in mind that enabling macros can be a potential security risk, so make sure to only enable them from trusted sources.

Enabling macros in PowerPoint can be a useful tool for automating repetitive tasks. However, it is important to understand the potential security risks and adjust the security settings accordingly. By following these simple steps, you can enable macros in PowerPoint and use them to enhance your productivity.

Working with VBA in PowerPoint

Visual Basic for Applications (VBA) is a programming language that allows users to automate tasks and create interactive presentations in PowerPoint. As a developer, the VBA editor is an essential tool for creating and editing macros. In this section, I will discuss how to create and edit macros in PowerPoint using the VBA editor and best practices for managing VBA projects and code.

To create a macro in PowerPoint, you must first enable the Developer tab. Once enabled, you can access the VBA editor by clicking on the Developer tab and selecting Visual Basic. This will open the VBA editor, where you can create and edit macros.

When creating macros, it is important to follow best practices to ensure that your code is efficient and easy to understand. One of the best practices is to use variables to store data and avoid hard-coding values. This makes your code easier to read and maintain.

To edit an existing macro, you can simply open the VBA editor and select the macro you want to edit. You can then modify the code to add new functionality or improve existing code.

Managing VBA projects and code is essential for ensuring that your macros are secure and efficient. One of the best practices for managing VBA projects is to use the VBA Project object model. This allows you to access and modify the properties of your VBA project, such as modules and forms.

Another important aspect of VBA project management is macro security. PowerPoint has built-in security features that allow you to enable or disable macros and set macro security levels. It is important to only enable macros from trusted publishers and avoid running potentially dangerous code.

When working with VBA code, it is important to use proper indentation and comments to make your code more readable. This makes it easier for other developers to understand your code and make modifications.

In summary, VBA is a powerful programming language that can be used to automate tasks and create interactive presentations in PowerPoint. By following best practices for creating and editing macros and managing VBA projects and code, you can create secure and efficient macros that enhance your presentations.

Macro-Enabled Presentations

As the name suggests, a macro-enabled presentation is a PowerPoint document that has macros embedded within it. Macros are small programs that automate repetitive tasks and enhance the functionality of the presentation. If you’ve created a macro in PowerPoint, you’ll need to enable macros in order to use it.

When you save a macro-enabled presentation, it’s important to remember that it may contain potentially dangerous code that can run on your computer. Therefore, it’s essential to save the document in a trusted location and only share it with people you trust. You can save the document as a PowerPoint Macro-Enabled Presentation (.pptm) file to ensure that the macros are saved along with the presentation.

Enabling macros in PowerPoint can be a security risk, as they can potentially contain viruses or malware. When you open a macro-enabled presentation, PowerPoint will display a security warning asking you to enable or disable the macros. If you trust the document and want to use the macros, you can click “Enable Content” to allow the macros to run.

It’s important to note that enabling macros in PowerPoint can pose security risks. Therefore, it’s recommended that you only enable macros in presentations from trusted sources. You can also adjust the macro security settings in PowerPoint to ensure that macros are only enabled in trusted documents or locations.

To adjust the macro security settings in PowerPoint, follow these steps:

  • Click on the “File” tab in the Ribbon.
  • Click on “Options” to open the PowerPoint Options dialog box.
  • Click on “Trust Center” in the left-hand pane.
  • Click on “Trust Center Settings” to open the Trust Center dialog box.
  • Click on “Macro Settings” in the left-hand pane.
  • Choose the security level that you want to use for macros. You can choose to disable all macros, enable all macros, or enable only digitally signed macros.

By following these steps, you can ensure that your PowerPoint presentations are secure and that macros are only enabled in trusted documents or locations.

Advanced PowerPoint Macro Techniques

PowerPoint macros can be used to add interactivity and efficiency to presentations. By using macros, you can automate repetitive tasks, such as formatting and aligning shapes, and create interactive elements, such as buttons and menus.

One way to use macros for interactivity is to create custom buttons that execute specific actions when clicked. For example, you can create a button that navigates to a specific slide, or a button that plays a video. To create a button, you can use the “Shapes” tool in PowerPoint and assign a macro to it.

Another way to use macros for efficiency is to automate repetitive tasks. For example, if you need to move a large number of shapes to a specific location, you can create a macro that does it for you. By automating these tasks, you can save time and focus on other aspects of your presentation.

While macros can be powerful tools, it’s important to use them responsibly to maintain security and efficiency. Here are some best practices for using macros in PowerPoint:

  • Digitally sign your macros: Digitally signed macros are less likely to be blocked by security settings. To digitally sign a macro, you need a digital certificate from a trusted authority.
  • Disable all macros except digitally signed macros: This setting can be found in the “Trust Center” options in PowerPoint. By disabling all macros except digitally signed macros, you can prevent malicious macros from running on your computer.
  • Disable all macros without notification: This setting can also be found in the “Trust Center” options in PowerPoint. By disabling all macros without notification, you can prevent macros from running automatically without your knowledge.
  • Take advantage of subscription benefits: If you have a Microsoft 365 subscription, you can access training courses and get expert help with macros and other features in PowerPoint, Excel, and Word.
  • Secure your device: Make sure your device is up-to-date with the latest security updates and antivirus software to prevent malware and other security threats.
  • Use the “PowerPoint Options” and “Quick Access Toolbar” features to customize your PowerPoint environment and make it more efficient.
  • Use the “Slide Master” and “Templates” features to create consistent designs and layouts throughout your presentation.
  • Use the “ActiveWindow.Selection” and “ShapeRange” objects to manipulate shapes and other objects in your presentation.
  • Use interactive elements, such as buttons and menus, to make your presentation more engaging and interactive.

By following these best practices, you can use macros in PowerPoint safely and efficiently. Remember to always test your macros before using them in a live presentation, and to keep your macros organized and well-documented for future use.

Leave a Comment Cancel reply

Save my name, email, and website in this browser for the next time I comment.

AutomateExcel Logo

AutoMacro: Ultimate VBA Add-in

VBA Code Helper

Read all reviews

Return to VBA Code Examples

PowerPoint VBA Macro Examples & Tutorial

powerpoint presentation macro enabled

Editorial Team

powerpoint presentation macro enabled

Reviewed by

Steve Rynearson

In this Article

VBA PDF (Free Downloads)

Save as macro-enabled presentation, enable ‘developer’ tab in the ribbon, create powerpoint macro, powerpoint application, open a new presentation, open an existing presentation, open and assign to a variable, refer to active presentation, save current presentation, close current presentation, useful references, assign existing presentation (by name) to variable, assign active slide to variable, assign slide by index to variable, count number of slides, get slide index number of current slide, add a blank slide to end of slide show, add a slide after current slide, delete a slide, go to a specific slide, loop through all slides, loop through all shapes of active slide, loop through all shapes in all slides, loop through all textboxes of active slide, loop through all textboxes in all slides, copy selected slides to new ppt presentation, copy active slide to end of active presentation, change slide during slide show, change font on all slides in all textboxes, change case from upper to normal in all textboxes, toggle case between upper and normal in all textboxes, remove underline from descenders, remove animations from all slides, save presentation as pdf, find and replace text, export slide as image, resize image to cover full slide, exit all running slide shows, open powerpoint – early binding, open powerpoint – late binding, make application visible, maniplulate powerpoint, close the application, copy from excel to powerpoint, powerpoint vba faqs.

This is a complete guide to automating PowerPoint using VBA (Visual Basic for Applications) Macros.  Below you will find many useful examples.

Download our free Microsoft PowerPoint VBA Tutorial! Or VBA Tutorials for other Office Programs!

vba powerpoint tutorial pdf

PowerPoint VBA (Macros) Tutorial

The Presentation with VBA code should be ‘Saved As’ PowerPoint Macro-Enabled Presentation (*.pptm)

vba powerpoint macro enabled

You should to enable the Developer tab on the Ribbon before creating VBA code. To do so choose File -> Options then click on ‘Customize Ribbon’ and check the box next to ‘Developer’ tab in the right pane.

powerpoint vba developer ribbon

This is a simple example of a PowerPoint VBA Macro:

It saves the active presentation as a PDF. Each line of code does the following:

  • Creates variables for the PowerPoint name and PDF name
  • Assigns the active presentation name to pptName variable
  • Creates the full PDF name
  • Saves the presentation as a PDF

When VBA code is running within a PowerPoint Presentation, PowerPoint Application is the default application and it can be manipulated without explicitly reference. Create a New Presentation

To create a presentation, use the Add method of PowerPoint application.

To open a new and blank presentation use the Add method of Application.Presentations collection

To open a presentation which you have already created, use the Open method of Application.Presentations collection

The code above assumes that the presentation is in the same directory as the PowerPoint Presentation containing the code.

You should assign the presentation you open to a variable so that you can manipulate it as per your requirements.

Use the reference ActivePresentation to manipulate the Presentation active in the GUI when the VBA code is executed.

The statement below will save the Active Presentation if it was saved before. It it has not been saved then you will be prompted with the ‘Save As’ dialog.

The statement below will close the Active Presentation even if it was not saved after the last edit.

You can move a slide from its old position to the new position

You can do something with each slide or go through all slides to find a few slides and do something about with using the code;

The power of PowerPoint can be realized by using ‘Shapes.’ The code below loops through all the shapes on the current slide so that you can manipulate them as you want;

You can loop through all the shapes in the presentation by adding a loop to go through all slides.

TextBoxes are the most often used Shape in PowerPoint presentations. You can loop through all the Text Boxes by adding a check for ‘Shape Type.’ TexBoxes have the shape type defined as the VBA constant msoTextBox (the numerical value of the constant is 17)

Again, you can loop through all the textboxes in the presentation by adding a loop to go through all slides.

To copy certain slides to a new presentations, first select the desired slides in the existing presentation and then run the code below;

Useful PowerPoint Macro Examples

Here are some useful macro examples showing how to do tasks. These will also demonstrate the concepts described above.

In typography, a descender is the portion of a letter that extends below the baseline of a font. In most fonts, descenders are reserved for lowercase characters such as g, j, q, p, y, and sometimes f.

When you underline text, it does not look nice under descenders. Here is the code to remove underline from all such characters g, j, p, q, and y in the whole Presentation.

Use the code below to remove all animations set in a Presentation.

You can easily save Active Presentation in PDF format.

You can find and replace text in All TextBoxes of All Slides. After the fist instance of the text you want to find (defined by findWhat) you need to loop through the Find command to find other instances, if any.

You can export Current SLide (or any other slide) as a PNG or JPG (JPEG) or BMP image.

If you have multiple Slide Shows open at the same time then you can close all of them using the macro below.

Automating PowerPoint from Excel

You can also connect to PowerPoint though other applications (like Excel and Word). As as first step, you must refer to an instance of PowerPoint.

There are two ways of doing it – early binding and late binding .

In ‘Early Binding’ you must explicitly set a reference to ‘Microsoft PowerPoint 16 Object Library’ (for MS Office 2019) in the VBE (Visual Basic Editor) using the option Tools->References.

In ‘Late Binding’ application variable is declared as an object and VBA engine connects to the correct application at run time.

After setting the reference to PowperPoint application, you may need to make it visible.

You can use all the methods to manipulate presentations, from within PowerPoint, described above from Excel by just adding the reference to PowerPoint created by you above.

For example

has to be used liked this

Once you have completed what you wanted to do with the PowerPoint application you must close it and should release the reference.

This code will copy a range from Excel to PowerPoint:

Note : It has been kept as simple as possible to show how a range from Excel can be copied to PowerPoint using VBA.

What are macros in PPT?

A Macro is a general term that refers to a set of programming instructions that automates tasks. PowerPoint (PPT) Macros automate tasks in PowerPoint using the VBA programming language.

How do I use VBA in PowerPoint?

To use VBA in PowerPoint, open the VBA Editor (ALT + F11 or Developer > Visual Basic).

How do I create a Macro in PowerPoint?

1. Open the VBA Editor (ALT + F11 or Developer > Visual Basic) 2. Go to Insert > Module to create a Code Module 3. Type ‘Sub HelloWorld’ and press Enter 4. In between the lines ‘Sub HelloWorld’ and ‘End Sub’, type ‘MsgBox “Hello World!’ 5. You’ve created a Macro! 6. Now press ‘F5’ to run the Macro

Written by: Vinamra Chandra

vba-free-addin

VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)

Free Download

automacro

AutoMacro: VBA Add-in with Hundreds of Ready-To-Use VBA Code Examples & much more!

How to use VBA in PowerPoint: A beginner’s guide

  • Written by: Jamie Garroch
  • Categories: PowerPoint productivity , Presentation technology
  • Comments: 45

powerpoint presentation macro enabled

Here at BrightCarbon we’re always looking for new ways to improve our own PowerPoint productivity and then share that knowledge with the presentation community (that includes you, by the way!). One of the ways we do this is by using VBA code to automate and extend the functionality of PowerPoint. We publish  free PowerPoint VBA code snippets here in our blog for you to use and also offer a PowerPoint automation service . This article explains how to grab the code from our articles and use it in your PowerPoint project, so that you can take your productivity to the next level!

What is VBA?

Visual Basic for Applications (VBA) is a programming environment for Microsoft Office applications. It’s included with your installation of Office by default  ( unless your system administrator has deactivated it ) . PowerPoint VBA provides you with a way to do one of two things   using macros and add-ins:  

  • A utomate  PowerPo int:   If you ever find yourself repeating the same task over and over again, VBA could be your new best friend.  Let’s say you have 100 slides and you need to unhide all hidden objects  across all those slides . That could take you  many  eye-straining minutes, but with a PowerPoint VBA it takes around a  second.
  • E xtend  PowerPoint :   Sometimes PowerPoint doesn’t have the feature you need  to complete your task . As an example, if you end up deleting default layouts from a template, there’s no  easy  way in PowerPoint to get them back. This article includes PowerPoint VBA code to do just that!

How to open the VBE (Visual Basic Editor)

Getting to meet your VBA friend is very simple. With PowerPoint open and at least one presentation file open, press  Alt+F11 * on your keyboard. This will open the VBE (Visual Basic Editor):  

PowerPoint VBE No Modules

*If for some reason Alt+F11 isn’t mapped on your keyboard you can right click anywhere on the ribbon, select  Customize the Ribbon…  and in the window that appears, tick the  Developer Tab  check box over on the right hand side before clicking  OK  to close the window. Now you can click the  Visual Basic  button within this tab:  

PowerPoint Developer Tab Visual Basic

Adding PowerPoint VBA code  

To add some VBA code, you need a container to put it in so go ahead and click  Insert  from the menu and then select  Module :  

PowerPoint VBE Insert Module

You now have a module ready to paste the VBA code into  from one of our blog articles :  

PowerPoint VBE Module Inserted

Copy the VBA code from  the required blog article  by double-clicking on it and then paste it into the  Module1  window above.  Here’s a very simple example of some code  to display a message dialogue :

You should now see something like this:  

PowerPoint VBA

Because this code is just a single  Sub  procedure called  HelloWorld , it’s referred to as a macro.  

Running  the PowerPoint VBA macro  

Now you have the macro in your presentation you can use  Alt+Tab  to return to the more familiar PowerPoint window. From here, the macro can be run by pressing  Alt+F8  on your keyboard  (or b y  clicking the  Macros  button in the Developer tab)  which opens a window containing a list of available macros:  

PowerPoint VBA

Security Soup

The first time you add VBA code to a file, Microsoft assumes that it is safe because you added it. As soon as you save, close and reopen the file, Microsoft doesn’t know that it’s your code so it will disable it by default. You can tell the Office app to allow your code to run either by signing it with a digital certificate (beyond the scope of this article) or by lowering the security setting for the app. You can do this in PowerPoint by clicking File / Options / Trust Center / Trust Center Settings / Macro Settings and selecting this option shown below:

VBA Macro Settings

Saving your file  

powerpoint presentation macro enabled

Once you ’ve added  VBA code  to  your presentation, PowerPoint will  ask you to save it as a  pptm  file  (the ‘m’ stands for macro)  instead of the more  familiar  pptx  format .  You can go ahead and do this to  either  keep a n archive  copy of your  code-enabled  project  or   to  create your personal macro library.  

If you want to distribute your  presentation,   it’s advisable to   save  it  using the familiar pptx format so that  your  recipients don’t see lots of verbose  security  messages  when opening  pptm  files!  

Y ou can  make  your file saveable as a standard presentation again  by  right – click ing  on  each   code module in the  project explorer pane , clicking  Remove   ModuleX …   and either click  Yes   (if you want to keep a backup of the modules independently of your presentation)  or  No   when  asked if you want to save the module before removing it :  

powerpoint presentation macro enabled

Now your presentation doesn’t include any code and you can save it as a pptx file.  

So, there you have it.  You now know how to open the VBE, insert a PowerPoint VBA code module, paste code into it, run the macro and save the file in either pptm  or pptx formats. All you need is a cool macro to make your daily life even easier. Keep checking in with our blog for more useful macros – like this one on restoring default slide master layouts!

Got something extra you’d like PowerPoint to do?

Check out our PowerPoint automation service which provides you with a custom solution to your specific needs.

powerpoint presentation macro enabled

Jamie Garroch

Principal technical consultant, related articles, how to consistently brand graphs and charts across microsoft office.

  • PowerPoint design / PowerPoint productivity
  • Comments: 1

How do you make sure that your graphs and charts have consistent branding across Excel, PowerPoint and Word? Learn how to create and use custom templates that support your brand identity across Microsoft Office.

powerpoint presentation macro enabled

Changes to VBA Macro Security in Microsoft 365

  • Presentation technology / Industry insights
  • Comments: 2

You can do some really cool things in Microsoft Office with just a few lines of Visual Basic for Applications (VBA) - from creating your own custom formula in Excel to correcting branded content in PowerPoint to merging address data for a mail campaign in Word. And sometimes you need to share that VBA solution with colleagues and clients, via the Internet. A change that Microsoft rolled out at the end of March 2022 tweaks the process required by Windows users to gain access to this active content.

powerpoint presentation macro enabled

Protecting your prized PowerPoint content

  • PowerPoint productivity / Presentation technology

Our comprehensive guide to password protecting PowerPoint files so your precious presentations stay just they you made them!

very simple, very explicit, very good help for a beginner vba programmer in powerpoint. Thanks

great resource, thanks. I’ve used VBA for years in MSaccess, and this is a good refresher for me.

I am trying to make a ppt file that loops until stopped. then I save it as a video. the ppt ran and looped continuously. Once recorded as video it stopped looping. do you have code to make ppt work when in video format

Hi Charles. As soon as you export a PowerPoint deck as a video all the PowerPoint functionality is removed as the file is magically transformed into an MP4 file, without VBA (sob sob). The only way to make the video loop is to use the looping feature of your video player.

Yeah, your best off recording a screen capture of the presentation running, then cutting it so it loops perfectly.

You can convert the video into gif file so that it will loop

Hi Jamie, thanks for the clear into, I am very new to this so that really helps. I am trying to develop a VBA macro that looks for the left hand mouse key being pressed and held down for more than two seconds whilst over a shape in slideshow mode. Once this is satisfied (i.e. two second press) for it then to hyperlink or take the user to a specified slide or even the next slide worst case.

I realise there is an automated/ built in feature (Action) that does this type of thing for a mouse click or mouse over but I really need a “long press” to activate if possible.

Any help appreciated.

Hi Simon and thanks for a great question. What you’re looking to do is pretty complex because VBA doesn’t natively support mouse actions in the PowerPoint slide show window. But, it is possible to use a Windows API (hence no Mac compatibility) called GetAsyncKeyState to gain access to mouse button click events. I had a look at this and quickly ran into a brick wall because an action link to a macro in slide show mode (Insert / Action / Mouse Click / Run macro) fires on the mouse up event, not mouse down. That means any corresponding VBA timer code can’t run until after the user releases the button and hence too late to detect if it was held down for two seconds. Maybe something could be done with the mouse over event to simulate what you need to achieve? Another approach could be to use the mouse down event on an invisible userform although that is also getting very involved with multiple Windows APIs. Depending on what you’re trying to do, you could also start the timer on click one, change the colour of the clicked shape and show countdown text before reverting to the original colour. If the user clicks a second time before the time expires, then the hyperlink is fired.

Valuable app

Hello I have a question:

Private Sub CommandButton2_Click() ActivePresentation.FollowHyperlink _ Address:=”http://192.168.16.49/?OUT1=ON”, _ NewWindow:=False, AddHistory:=False ActivePresentation.SlideShowWindow.View.GotoSlide (2)

Now it opens Chrome. but how can i make it that it opens te address en afther that shut down chrome.

Hi Tom. Your example should open the default browser at the URL specified by the Address parameter. For more information on the FollowHyperlink method, see this Microsoft documentation: https://docs.microsoft.com/en-us/office/vba/api/powerpoint.presentation.followhyperlink

Thank you very much! It’s exactly what I needed.

I have tried using your randomizing macro with a powerpoint – I must be doing something wrong, because it isn’t putting the slides in random order. Please advise! I copied the macro exactly (using cut & paste), and thought I was following all the directions here for how to use it in the powerpoint. But, no random presentation of the slides. Boo hoo!

Hi Marya. Let’s check that VBA is installed and enabled on your machine. Can you add the following macro to the VBE project (just below the existing one) and try to run it from the PowerPoint window using Alt+F8?

Sub CheckVBA() MsgBox “it’s working” End Sub

Make sure the quotes are the straight type.

I am trying to format my title page so that the number displayed is equal to the linked slide and updates automatically wherever the slide is moved. For example “about us” is on slide #5 and linked, so it goes to slide 5 when you click on the word. I need the number (in a separate text box) to update automatically to the slide number location that the link goes to.

Hi Mary and thanks for the question. It looks like you’re interested in some kind of automated agenda slide builder. That’s a fair bit of code to create and quite complex as it needs to handle events from PowerPoint to detect when slides have moved. It could be possible to write a simpler macro which you run manually each time you want to update that title page. You’d need start by finding a way to identify which objects are your numerical indicators. For example, if you named your objects in the selection pane (Alt+F10) “Agenda Link”, then is simple macro could be a starting place for you: Sub UpdateAgendaNumbers() Dim oSld As Slide Dim oShp As Shape Dim LinkedSlideIndex As Long On Error Resume Next For Each oSld In ActivePresentation.Slides For Each oShp In oSld.Shapes If oShp.Name = “Agenda Link” Then If oShp.ActionSettings(ppMouseClick).Action = ppActionHyperlink Then If oShp.HasTextFrame Then LinkedSlideIndex = Split(oShp.ActionSettings(ppMouseClick).Hyperlink.SubAddress, “,”)(1) oShp.TextFrame.TextRange.Text = LinkedSlideIndex End If End If End If Next Next End Sub

Great wealth of information. Have never used macros before but was looking to use them to help with this situation. At work we use Work Orders (created in Power Point) and are looking to include a sequential number to them (print 50-100 copies of one slide with the numbers) and if possible would like the number to continue from the last printed number…been trying to find some code to help but not having much luck possible partly due to being new to macros

That’s definitely something we could help design for you Joshua. If you’d like to discuss further, please click the Contact button at the top of this page.

I tried this changing the font color of text within the textbox. I used this to change the font color on a mouse over:

Public Sub GraphicHover(ByRef oGraphic As Shape)

oGraphic.TextFrame.TextRange.Font.Color.RGB = RGB(0, 130, 202)

and it works just fine. But, when I move the mouse off the text box, onto the invisible rectangle with this code attached to the mouseover event, it doesn’t change the text color back to it’s original color and remains the color I changed it to mentioned above. I know the mouseover event is being triggered because I checked “Highlight when mouse over” and I am seeing the highlight on the invisible rectangle:

Public Sub ResetGraphicHover(ByRef oCover As Shape) Dim oSld As Slide Dim oShp As Shape Set oSld = oCover.Parent For Each oShp In oSld.Shapes With oShp.TextFrame.TextRange.Font.Color If .RGB = RGB(0, 130, 202) Then .RGB = RGB(121, 135, 156) End With Next End Sub

Any clue where my ResetGraphicHover is failing?

Hi Dave. I took your code and it works for me. You could add a debug line after the For Each… line in the rest macro to check that (a) it’s firing and (b) which shapes are being looked at on your slide. To do that, add this:

Debug.Print oShp.Name

After you run the slide show, check the output in the VBE Immediate pane (Ctrl+G to toggle it).

Hi I am creating an interactive game (matching cards or concentration) in PowerPoint. If the 2 cards match, I need a pop-up text box to appear. If the 2 cards do not match, I need a sound to play.

I understand I need programming to make this happen. Please help or give alternative ways to achieve this. Thanks.

Hi Tammy. Have a look at this article which will help you: https://www.brightcarbon.com/blog/powerpoint-memory-game/

Hi Producer I will like to get comments on macros you can make available to me. Beautiful. I am using this approach frequently to make offline projects. Thanks. S. Fas

Excellent!!! Thank you!

You’re more than welcome Nataša!

Thank you! Is there any option to replace a font in the entire presentation for a specific character. Let’s say, I would like to change font only for dots in the deck but I would like to keep the rest in the original font. Any idea please? Thank you so much!

Hi Jan. You might be able to use the Replace Fonts feature found in the Home tab of PowerPoint under the Replace menu at the far end of the ribbon. If you need to use VBA then set up a nested loop to iterate all shapes within all slides and then use the oShp.TextFrame2.TextRange.Font object to change the font.

Exellent explenation. so beutiful. I am creating an interactive e learing quiz. Thanking you.

Hello! I have a client who’s interested in using tagging to help create searchable content within slides. For example, they have four different categories for slide content across multiple presentations (Overview, Market, Product, Country). I’d like to assign a different shape to represent each of the four categories, where a blue square might represent Overview slide content. Then, when someone uses the keyword “Overview” to search for overview content (on Teams or SharePoint), these slides are easily identified. Is this something that’s possible with VBA code?

Hi Linda. That’s a very good question! Given the need is to search via SharePoint, VBA probably won’t help here as the PowerPoint file needs to be opened for VBA to examine its content. I have a sneaking suspicion that if you add keywords in the Tags field under File / Info that SharePoint may use this. But, that’s at the file level rather than the slide level. We have a PowerPoint add-in called ShowMaker that might be of interest as it allows you to add category metadata to slides and then the presenter can use that to filter the deck and export the required content. You can find an overview of it here: https://www.brightcarbon.com/showmaker/ and we could set up a demo if you’re interested (please use the Contact button at the top of this page if that’s the case).

I’ve just created an elearning package in PowerPoint using VBA , I didn’t realise it could sum up text boxes within PowerPoint to mark the qualification at the end. Also used AWS text to speech over the top of the learning . Looks great

Sounds like a fun and successful project Stu! Thanks for sharing 🙂

I have a bit of a tricky one but hoping it is possible to do with VBA. We offer training services to multiple clients that can be customized but the majority of training is consistent from one client to the next (main changes are the slide masters/formatting and addition/removal of certain sections).

What we want to do is create one master (or multiple) training document(s), and then use VBA’s to link it to the client specific PowerPoint. We want to link the master rather than using the “reuse slide” command so that if we update one file the other will automatically update as well.

Not sure if it matters, but our company uses sharepoint as storage

Hi Dave and thanks for a great question. VBA is an excellent solution for automating a manual process. In general, if a person can perform a task manually via a sequence of pre-defined steps then VBA can do it automatically, faster, and with less chance of mistakes for something done many times. We’d be happy set up a call to discuss your needs further and see what could be automated with VBA. If that’s of interest, please use the contact button at the top of the page and mention my name in the form.

PP does not seem to have the record macro feature. To write vba code in PP by someone who only worked with vba in excel, would require some prior knowledge. Is there a summary of the most common objects, methods etc to refer to?

Hi Reef. You’re correct that there’s no VBA macro recording feature in newer versions of PowerPoint. The best place to start learning is by purchasing a book (there’s one called “Mastering VBA for Microsoft Office 365” on Amazon or reading the extremely exciting Object Model documentation from Microsoft: https://docs.microsoft.com/en-us/office/vba/api/overview/powerpoint/object-model

Hi Greeting I had made a game in power point using VBA codes. At last it generate a report every time a candidate conduct the game . My requirement is to generate result in same excel sheet after conducting the game. Like Row 1 player 1 result Row 2 player 2 result I need your help Regards

Hi Asheesh. It’s possible to use VBA to get PowerPoint to “talk” to Excel (and other Office apps) but it’s a bit complicated to mention in a comment here. We’d be happy to help if you’d like a quote or if you want to try yourself you could start with this: Set oXL = CreateObject(“Excel.Application”) and have a look at some online examples. I’d also recommend the book “Mastering VBA for Microsoft Office 365” available from Amazon.

If there are two colors of font in the textFrame, how to change the font of one color through VBA?

Hi Bruce. You could either iterate through the Characters collection of the TextRange2 object or the Runs collection which returns all of the TextRanges with the same style. Example: ActiveWindow.Selection.ShapeRange(1).TextFrame2.TextRange.Runs(1).Font.Fill.ForeColor.RGB

Hi – can you help, please?

How can I change the font color and size of the message box? What code will work and where will I put it? Creating an interactive game in powerpoint. Thank you!

—– Sub Correct() Points.Caption = (Points.Caption) + 10 Output = MsgBox(“Your answer is correct, well done!”, vbOKOnly, “Correct Answer”) ActivePresentation.SlideShowWindow.View.Next End Sub

Sub Incorrect() Points.Caption = (Points.Caption) – 5 Output = MsgBox(“Your answer is incorrect.”, vbOKOnly, “Wrong Answer”) ActivePresentation.SlideShowWindow.View.Next End Sub

Sub Reset() SlideLayout.Points.Caption = 0 ActivePresentation.SlideShowWindow.View.Exit End Sub ———-

Thanks for your explanation.

Hi Jamie, Is there any way to keep my macro save in a file so I can utilize on any other PPTs equivalent as.normal.dotm for Word, .xlam(add-in) for Excel.

Hi Anurag. Thanks for the question and Happy New Year! The best way to do this would be to export your project as a ppam and activate it as an add-in via the PowerPoint add-ins UI. Save your ppam in %AppData%\Microsoft\AddIns and then in the Windows PowerPoint Developer tab, click PowerPoint Add-Ins and add your ppam from there. If you’re not code-signing your VBA project, you may need to adjust Trust Centre settings. You could optionally build an EXE/MSI installer package for Windows and PKG for macOS, although that is a more complex topic.

Join the BrightCarbon mailing list for monthly invites and resources

BrightCarbon are a great partner in our growth. They are great to work with, very consultative, and professional. I could not recommend working with them more highly. Neil Davidson Deltek

powerpoint presentation macro enabled

EasyTweaks.com

PowerPoint Macros: How to run VBA in your PowerPoint 2016 and 2019 slides?

Applicable to Microsoft Office 365, 2019 and older. Windows operating Systems.

Here’s a question we got from a reader:

I have a need to automatically resize all images stored in a specific presentation I have to prepare for my management. As the slides are quite standard, this looks like something I could automate using a Macro. The thing is that I don’t find the macro recorder button in the PowerPoint development tab. Can you help?

Yes sure! There quite a bit of boring PowerPoint related tasks that could be automated:

  • Auto-creating periodical presentations (say quarterly reports).
  • Auto-formatting your PowerPoint slides – applying styles, fonts.
  • Working with images (resizing, adjusting to slide templates etc’).
  • Getting rid of unused slide master templates that bloat your presentation size.
  • And more…

Can i record a Macro in PowerPoint?

I would like to clarify this point, as couple of readers specifically asked for this. Microsoft PowerPoint doesn’t ship a macro recorder such as the one you’ll find in Word or Excel. Therefore,  if you want to automate PowerPoint, you’ll need to create your macro manually using Visual Basic for applications (VBA). VBA  is a relatively simple programming language that helps power users to extend Microsoft Office functionality. All that said, writing PowerPoint VBA is not complicated , just follow along the instructions below.

Create a macro enabled presentation

First off,  we’ll go ahead and create a backup of  the original presentation, so you can always come back to it if needed:

  • Open the specific presentation that you want to automate.
  • Save your presentation using a different file name, say MyPresentationwithMacros , and make sure to pick the file format .pptm (Powerpoint Macro presentation) as your file type.

In order to move forward with your macro development, you need to able to access your VBA programming user interface. If  you don’t see the a menu called Developer which by default appears in the right side of your Ribbon, you should go ahead and enable the development menu .

Add your Macro to PowerPoint

Your next step would be to insert your VBA code snippet into a Visual Basic for Applications Project Module. Follow the instructions below:

  • From the PowerPoint Ribbon, hit Developer.
  • Then hit the Visual Basic button.
  • The VBA editor will open up.
  • Now, from the project tree, highlight the VBAProject entry.
  • Now from the header menu hit Insert and select Module .
  • Type the following code into the newly created module. This small macro adds a  new slide into the second position in your Presentation.

Sub Add_Slide()

Dim NewSlide as Slide

Set NewSlide = ActivePresentation.Slides.Add(1, ppLayoutBlank)

Important: A word of caution here: Always ensure that you obtain your macro from reliable sources. Copying VBA code from the web is not a good idea!

  • Before running your code, you might want to check it for errors. Go ahead and hit Debug and then select Compile VBA project .
  • If you receive no error messages, you can go ahead and hit Save . This will update your PwerPoint macro enabled presentation.

Enable your macros

Your Microsoft Office installation might have VBA Macros disabled by default with no notification provided to the end user. If that’s the case, from the Developer tab, hit Macro Security and select Disable all macros with notification. From now on, PowerPoint will post a visible message below the Ribbon in case that your presentation contains Macros Content that was disabled by default and will specifically ask you for permission to run those Macros.

Running your PowerPoint Macro

  • Close the VBA editor and return to your PowerPoint presentation.
  • Back to your developer tab, hit Macros .
  • Pick the Macro that you have just added to your presentation in the previous section.

Assign your Macro to a button

As you just learn, you are able to easily invoke your PowerPoint macro from the Developer tab. You can also invoke the Macro from the View tab. However, if you are interested to improve the user interaction with the Macro you can you can easily assign it to a new button in the the quick access toolbar; alternatively you can link your Macro to a Command button in your slide or in a UserForm.

Custom Macro for PowerPoint examples

Couple readers asked for some Visual basic for Applications macro examples for PowerPoint. Feel free to contact me using the contact form to discuss your specific custom Macro development requirements.

Leave a Comment

You must be logged in to post a comment.

Show Menu

  • Video Tutorials
  • Knowledge Base
  • Group Licenses
  • Why Choose Us?
  • Certificates

User Avatar

  • PowerPoint Tutorials

Macros in PowerPoint: Full Tutorial and How to Write VBA Code for a “Swap Multiple Shapes” Macro

In this tutorial, you’ll learn how to set up macros in PowerPoint, and you’ll get practice writing VBA code for your first macro.

  • Tutorial Summary
  • Files & Resources
  • Premium Course

Macros in PowerPoint are useful for tasks such as performing tricky alignments, fitting shapes within tables, and using Drawing Guides, rather than physical lines, to distribute shapes.

Before you start using macros or writing your own VBA code, you must understand the fundamentals of PowerPoint: features like the Quick Access Toolbar , the Slide Master , Tables , and how to duplicate a shape .

It’s counterproductive to “automate” slides and presentations unless you first understand the key PowerPoint commands and shortcuts.

In this tutorial, we’ll walk you through how to create your first PowerPoint macro , which you can use to swap the positions of multiple shapes.

This code is simple, but it is also very useful because it typically takes several keyboard shortcuts and mouse drags to swap shapes manually, so an automated solution is a clear win.

And amazingly, there is no built-in way to do this in the standard version of PowerPoint.

PowerPoint Pro

PowerPoint Pro

Master PowerPoint by creating a sell-side M&A / valuation pitch book for Jazz Pharmaceuticals - plus company/deal profiles and more.

Video Table of Contents:

0:58: Why Macros Are Useful in PowerPoint

2:44: PowerPoint Macro Demo

6:27: Lesson Overview

6:40: VBA in Excel vs. PowerPoint

10:09: Simple “Shape Swap” Macro

18:29: Macro to Swap Multiple Shapes

25:29: Recap and Summary

Files & Resources:

Slide Presentation – Macros in PowerPoint and VBA Tutorial (PDF)

Reference Slides for Macro Exercise (PPT)

“Finished” Version of Macro and Reference Slides (PPTM)

PowerPoint Macros and VBA in Excel vs. PowerPoint

Before jumping into the code, it’s worth asking two key questions:

  • What are the advantages and disadvantages of VBA and macros in Excel vs. PowerPoint?
  • What are good vs. bad use cases for macros in PowerPoint? In other words, what is the most effective way to spend your time automating your presentations?

On the first question, VBA in Excel is simpler to set up and use for quick macros .

Excel has a macro recorder, so you can record your actions in a spreadsheet, review them in the VBA Editor, and modify the code to do what you want.

Also, assigning keyboard shortcuts to your macros is easy because you always select a keyboard shortcut when you record actions in the macro recorder.

By contrast, PowerPoint macros are more difficult to set up but are arguably more powerful .

Most Excel macros function based on a selected range of cells in a single spreadsheet and automate processes like color-coding the cells or changing the decimal places.

That’s nice, but PowerPoint macros often change the entire presentation , including on normal slides and templates in the Slide Master .

Also, PowerPoint macros do not break the “Undo” command , so you can press Ctrl + Z (or ⌘ + Z on Mac) repeatedly, and it will work correctly with all macros.

But in Excel, macros break the Undo and Redo commands unless you build a workaround into your code, which can get very complicated.

Here’s a summary of VBA in Excel vs. PowerPoint:

VBA in Excel vs. PowerPoint

Returning to the second question above – good vs. bad use cases for macros in PowerPoint – focus on macros that are simple to code and that automate actions you repeat a lot .

For example, swapping shapes is quite simple to code (5-10 minutes), and it saves you time because it’s cumbersome to swap shape positions manually. Plus, it’s a common task when editing presentations.

On the other hand, it’s silly to write a macro that “centers” a shape vertically and horizontally on a slide because the “Align Center” and “Align Middle” commands already do this, and it’s not especially common to center single shapes on a slide in corporate presentations.

Something like the Table of Contents macro in our full macro package, which is based on the Slide Master and custom layouts, is in the “maybe” category.

It saves you time, but it’s also complicated to code and test, and it doesn’t work 100% perfectly in all cases.

Plus, you might only add the Table of Contents when you’re finished with a presentation, so this macro may be less useful than simpler shape manipulation commands.

Your First PowerPoint Macro: “Swap Shapes”

To start writing your first macro, go to the “Trust Center” in PowerPoint (Alt, T, O in the PC version or ⌘ + , on Mac) and make sure the program will let you run macros:

PowerPoint Trust Center

Use one of the settings above (the screens will look slightly different on the Mac) and make sure the “Developer Toolbar” in the ribbon menu is visible by going to “Customize Ribbon” within the Options menu:

PowerPoint Ribbon Menu and Developer Tab

Once you’ve done this, open the VBA Editor with Alt, L, V on the PC (there is no Mac shortcut, so navigate there manually) and insert a “module” and a “subroutine” to write a new macro:

Macros in PowerPoint - Adding a Module and Subroutine

You can call the new module “SwapShapes” and add a new subroutine with the same name on the right side of the screen:

Macros in PowerPoint - VBA Subroutine

After you type “Sub SwapShapes()” VBA will automatically insert the “End Sub” at the end to indicate that your macro ends there.

With simple macros, you usually want to work with the shapes, slides, or text the user has selected .

That’s how this “Swap Shapes” macro will work: it will assume that the user has selected the shapes they want to swap, and then it will change their positions.

First, you need to make sure the user has selected shapes , and if so, that they’ve selected 2 shapes rather than 1, 10, or 50 shapes:

PowerPoint VBA - Checking the User's Shape Selection

“IF” statements are the building blocks of all programming languages, including VBA.

They let you check conditions, such as the selection consisting of 2 shapes, and they take actions based on whether these conditions are true or false.

The ActiveWindow.Selection object in VBA contains whatever the user has selected (shapes, slides, text, or nothing at all), and it has “properties” for things like the selection type and the number of objects selected .

You can use the “IF” statements with ActiveWindow.Selection to check for these conditions.

If you’re unsure of an object’s properties, you can start typing its name followed by a “.” so that VBA displays a list of options.

The “=” operator is used for both assignments and equality checks in VBA, which is a bit confusing. But if it’s part of an “IF” statement, as it is here, it’s an equality check.

The MsgBox command is useful for testing the code as you move along and ensuring the “IF” statements work.

Next, you need to save the first shape’s Top and Left positions and put them in “variables” that you can refer to later.

Here’s the code:

PowerPoint VBA - Saving the Shape Positions in Variables

The “=” signs in the main part of the code are assignment operators because they’re not within “IF” statements.

So, they SET one shape’s Left and Top coordinates to the other shape’s Left and Top coordinates.

Again, it is confusing how “=” can check for equality in VBA and set the value of a variable; there is no easy answer other than “continued practice and exposure.”

The ActiveWindow.ShapeRange(1) part means: “Take the first shape the user has selected on the current slide.”

You can use ActiveWindow.ShapeRange(2) to refer to the second shape, which takes us into the next part: setting the first shape’s Top and Left positions to those of the second shape.

PowerPoint VBA - Changing the First Shape's Top and Left Positions

If you stopped here, you’d have a problem because you’ve now lost the first shape’s original Top and Left positions.

This is why you saved them in the tempLeft and tempTop variables: by saving these original positions in variables, you can now use them to change the second shape’s position.

Macros in PowerPoint: Swapping the Original Positions of the First Shape with the Second Shape

This code properly swaps the positions of two shapes.

However, you can make it more efficient by using a “With” statement, which also exists in Excel VBA, to remove the need to type ActiveWindow.Selection:

PowerPoint VBA and "With" Statements

When you type the “With ActiveWindow.Selection” line, anything that starts with a “.” between that and the “End With” is assumed to be part of ActiveWindow.Selection.

So, VBA “translates” a line like this:

tempLeft = .ShapeRange(1).Left

tempLeft = ActiveWindow.Selection.ShapeRange(1).Left

You can now go into PowerPoint and test this macro with different shapes on the reference slides.

To do this, use the Alt, L, PM shortcut in the PC version (no Mac equivalent, so navigate to Developer in the ribbon menu and click on Macros), select “SwapShapes” and click “Run”:

"Shape Swap" Macro Execution on a Normal PowerPoint Slide

As a final step, you can save this file as a macro-enabled presentation in the .pptm format:

Saving Macros in a Macro-Enabled PowerPoint File

By doing this, you’ll ensure that whoever opens the file next can still use this macro.

The Limitations of Macros in PowerPoint

This simple exercise, while useful, also reveals a few issues with macros in PowerPoint:

1) Keyboard Shortcuts – There is no easy way to assign keyboard shortcuts to macros; you must activate them through the “Macros” menu in the Developer Toolbar.

2) Macro-Enabled Files – While you can save macros with the above method, it is not ideal for sharing them or making them usable across different presentations.

3) Code Constraints – It’s simple to write code that handles only 2 shapes , but it’s not immediately obvious how to extend it to manage multiple shapes.

We could fix these issues now or explore other enhancements, but the first two points above are surprisingly complicated to solve.

So, we’ll focus on point #3 and extend this macro to make it swap multiple shapes:

An Extension to Macros in PowerPoint: “Swap Multiple Shapes”

You can extend this macro to swap multiple shapes with a few simple changes.

Start by changing the variable declarations and error checks at the top.

When the user selects multiple shapes, you need to save the first shape’s positions , and you need to create a “counter variable” that tracks the shape # you’re currently on.

For example, if the user has selected 10 shapes, you need to know if you’re currently on shape #1, #2, #3, or #4-10 as you move through the selection and change each shape’s positions.

Also, you need to make sure the user has selected more than 1 shape – not necessarily just 2 shapes:

PowerPoint VBA - Checking to Ensure That More Than 1 Shape is Selected

Next, you need to “loop” through all the shapes the user has selected with a “For” statement.

So, if the user has selected 10 shapes, you need to move from shape #1 through shape #10 and change the position of each shape.

You can start by typing the syntax for this “For” loop:

PowerPoint VBA - For/Next Loop for Selected Shapes

For an example of how this works, continue assuming that the user has selected 10 shapes.

In this case, you should loop through shapes #1 – #9 and set each shape’s Left and Top positions to the next shape’s Left and Top positions.

So, Shape #1 Top should become Shape #2 Top, and Shape #2 Top should become Shape #3 Top.

When you reach shape #10, you should set its Top and Left positions to those of the first shape .

This means you need to save shape #1’s Top and Left positions before starting this loop.

You can start by handling the case for shapes #1 – 9, or “everything before the final shape”:

PowerPoint VBA - Modifying the "For" Loop for Everything Before the Final Shape

As the next step, you can add a special case to save the first shape’s position before the “For” loop and set the last shape’s position equal to the first shape’s:

Macros in PowerPoint: Saving the First Shape's Positions and Swapping Them in for the Last Shape

You can now test these changes on the reference slides and verify that this macro “rotates” multiple shapes:

Macros in PowerPoint: Testing the Shape Swap Macro with Multiple Shapes on the Reference Slides

Activate the macro enough times, and the shapes will return to their original positions.

Macros in PowerPoint: Beyond the Surface-Level Detail

If you’ve followed the steps above, you should have a “Multi-Shape Swap” macro you can use to rearrange your slides.

But this tutorial just scratches the surface; it represents ~30 minutes out of the 12-13 hours of VBA training in our full PowerPoint Pro course .

You can do far more with macros and VBA than simple shape manipulation – as shown in the video above, you can manipulate tables, combined table/shape designs, and even the Language properties of entire presentations.

And you can automate the alignment, distribution, and formatting processes in many ways, including the clever use of Drawing Guides.

You can see the full set of macros in the course below:

Macros in PowerPoint: Full BIWS Macro Package, Part 1

You’ll gain access to the full package and all the detailed tutorials as soon as you sign up for the PowerPoint Pro course:

powerpoint presentation macro enabled

About Brian DeChesare

Brian DeChesare is the Founder of Mergers & Inquisitions and Breaking Into Wall Street . In his spare time, he enjoys lifting weights, running, traveling, obsessively watching TV shows, and defeating Sauron.

Files And Resources

powerpoint presentation macro enabled

Premium Courses

Other biws courses include:.

powerpoint presentation macro enabled

Perfect Your PowerPoint Skills

The BIWS PowerPoint Pro course gives you everything you need to complete pitch books and presentations in half the time and move straight to the front of the "top tier bonus" line.

  • Editor's Choice: Back-to-School Tech Gifts
  • Get These 12 Student Discounts!

What Is a PPTM File?

Open and edit a macro-enabled PowerPoint presentation for free with WPS Office, Google Slides, or PowerPoint Online

powerpoint presentation macro enabled

  • Emporia State University
  • Google Drive
  • Backup & Utilities
  • Cryptocurrency

What to Know

  • A PPTM file is a macro-enabled presentation file created by PowerPoint.
  • View and edit one for free with WPS Office , PowerPoint Online, or Google Slides.
  • Convert to PDF with FileZigZag , or use PowerPoint to save to PPTX, MP4, etc.

This article explains what PPTM files are, all the different ways you can view or edit one, and how to convert the slideshow into a different format like PDF or PPTX, or a video format like MP4 or WMV.

A file with the PPTM file extension is a Microsoft PowerPoint Open XML macro-enabled presentation file. They're comprised of pages/slides that hold text, media files like images and videos, graphs, and other things pertinent to a presentation.

Like PowerPoint's PPTX format, PPTM files use ZIP and XML to compress and organize the data into a single file. The difference between the two is that PPTM files can execute macros, while PPTX files, although they might contain them, can not.

PPSM is a macro-enabled file similar to PPTM, but is read-only by default and immediately starts the slideshow when opened. PPTM files let you edit the contents right away after double-clicking the file.

How to Open a PPTM File

If you just need a super quick way to view the contents of the file without any editing or conversion tools, and without needing to make a user account, use GroupDocs .

However, for full editing power, use Microsoft PowerPoint 2007 or newer. If you have an older version, you can still open the file if you have the free Microsoft Compatibility Pack installed.

PPTX files can run scripts that have the potential to be malicious, so it's important to take great care when opening executable file formats like these that you may have received via email or downloaded from websites you're not familiar with. See our List of Executable File Extensions for a listing of file extensions to avoid and why.

PowerPoint Online is one of Microsoft's free PowerPoint viewers that fully supports opening PPTM files as well as saving back to the same format. Files you open there are stored in OneDrive.

Similar to PowerPoint's online editor is Google's, called Slides . It's totally free to view and edit PPTM files. Files you upload there are stored on Google Drive.

The free WPS Office works with this format as well, letting you open, edit, and save to various PowerPoint formats. That same company has an online version at WPS Cloud where you can view and edit the file.

Another way to open (but not edit) PPTM files without PowerPoint is to use Microsoft's free PowerPoint Viewer program.

The following free software can open and edit PPTM files as well, but they make you save the file to a different format (not back to .PPTM): OpenOffice Impress , LibreOffice Impress , and SoftMaker FreeOffice Presentations .

If you just want the images, audio, and video content from the file, but you don't have a PPTM reader or editor installed, you can open the file as an archive with 7-Zip . Look in the ppt > media folder for those types of files.

How to Convert a PPTM File

The easiest way to convert the file is to use one of the PPTM viewers/editors from above. Once the file is open in the program, you can save it to another format like PPTX, PPT, JPG, PNG, PDF, and many others.

To convert PPTM to an MP4 or WMV video, use PowerPoint's File > Export > Create a Video menu.

WPS Office's desktop application is one way you make image files out of the slides.

You can also use the free, online file converter FileZigZag to convert the slideshow to a variety of formats, including PDF, ODP, POT, SXI, HTML, and EPS.

Still Can't Open It?

This file extension closely resembles the PTM extension used for MapPoint map files and PolyTracker module files. If your file doesn't work with the presentation software mentioned above, check the file extension again, because it might only work with a program like Winamp (if it's a PTM file).

Another example of file extensions that can easily be mixed up for a PPTM file is PTP and PTX , which are both related to Avid Pro Tools.

Get the Latest Tech News Delivered Every Day

  • What Is a PPSM File?
  • What Is a PPT File?
  • What Is an EXR File?
  • What Is a CPGZ File?
  • What Is an HTACCESS File?
  • What Is an XBIN File?
  • What Is a POTX File?
  • What Is an IFC File?
  • What Is an FB2 File?
  • What Is an XNB File?
  • What Is a GRD File?
  • What Is an XTM File?
  • What Is an ALP File?
  • What Is an AIT File?
  • What Is a TEX File?
  • What Is an ARD File?
  • Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

How to auto execute a macro when opening a Powerpoint presentation?

I have a pretty basic question, but could not find the answer on internet. In Powerpoint 2010, I have a macro that I would like to be executed everytime the Powerpoint document is opened. How to achieve this ? Thanks !

Laurent Crivello's user avatar

  • You couldn't find an answer? C'mon! Doing a search with "powerpoint auto start macro" on google gives you: pptfaq.com/… –  Ocaso Protal Commented Jul 3, 2012 at 7:45
  • 1 When reading add-ins, I thought that this was a workaround for something that obviously MUST have existed. But you are right, add-ins seem to be the only way for me. Thanks ! –  Laurent Crivello Commented Jul 3, 2012 at 11:30

3 Answers 3

While Auto_Open doesn't run in a PowerPoint presentation, you can fake it. Add a CustomUI part to the presentation, then use the CustomUI OnLoad callback to run code when the presentation opens. The CustomUI part needs no more than just the CustomUI tags.

Get the Custom UI Editor from here: http://openxmldeveloper.org/articles/customuieditor.aspx

Open the presentation in the Custom UI Editor. Insert a CustomUI part from the Insert menu:

Add a Custom UI part

Now enter some simple RibbonX code, like this:

Now write your on-open procedure:

If you have both this and the Auto_Open procedure in an add-in, Auto_Open runs first.

Full disclosure: while I thought of using this approach and have used it in Excel, I waited until I first encountered it on the PPT Alchemy web site: Run Code When PowerPoint Opens .

Jon Peltier's user avatar

I am using PowerPoint 2016 so I can't speak for earlier versions although the documentation indicates this works for PowerPoint versions 2016, 2013, 2010, 2007. This method DOES NOT require any add-ins or application hooks to handle events.

Reference link: https://support.office.com/en-us/article/command-line-switches-for-microsoft-office-products-079164cd-4ef5-4178-b235-441737deb3a6?ocmsassetID=HA010153889&CTT=1&CorrelationId=ea39d200-aa81-4d6e-8302-afff4c65859e&ui=en-US&rs=en-US&ad=US#ID0EAABAAA=PowerPoint,_PowerPoint_Viewer )

Start PowerPoint from command line and use the /M switch to have PowerPoint run a specified macro when it starts a named presentation file.

The easiest way to do this is to create a shortcut to the PowerPoint application. Then go to the Properties window for the shortcut and select the Shortcut tab. Next, add the /M switch, your presentation file name (including path), and the name of the macro to run (case sensitive and must be part of the presentation) to the end of the Target field. Double-click the shortcut and voila!

Example: My presentation is C:\myPPTpres.pptm and the macro is Run_Slide_Show so I will need to add /M "C:\myPPTpres.pptm" "Run_Slide_Show" to the end of the existing text in the Target field.

"C:\Program Files (x86)\Microsoft Office\root\Office16\POWERPNT.EXE" /M "C:\myPPTpres.pptm" "Run_Slide_Show"

Make sure you are running a macro-enabled version of the presentation (in 2016 it has the .pptm extension.)

Important note if you are trying to start a slide show automatically using the macro. Add a delay of one or more seconds at the very beginning of your macro to allow the application to finish its startup sequence. If you do not the slideshow will start but the application will steal focus as it completes its startup, pushing your slideshow to the background.

smitty2781's user avatar

  • Just in addition, to add a delay I first used the windows sleep function. This froze the app completely and didn't work. To add a delay, check out this article: myonlinetraininghub.com/… Worked for me with the last solution described. –  FRules Commented Apr 11, 2019 at 7:40

Assuming the type of macro to be Auto Events related such as Auto_open(), Auto_close(), Auto_print() etc., for powerpoint to execute macros on opening powerpoint file we require Powerpoint Add-Ins to be included or other option could be to save the file as .ppa or .ppam.

For more details and to download the AutoEvents zip file refer the link: http://skp.mvps.org/autoevents.htm

sushh's user avatar

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged macros powerpoint startup execute or ask your own question .

  • The Overflow Blog
  • From PHP to JavaScript to Kubernetes: how one backend engineer evolved over time
  • Featured on Meta
  • We've made changes to our Terms of Service & Privacy Policy - July 2024
  • Bringing clarity to status tag usage on meta sites
  • Feedback requested: How do you use tag hover descriptions for curating and do...
  • What does a new user need in a homepage experience on Stack Overflow?

Hot Network Questions

  • Thai word not breaking properly between lines, in LuaLaTeX
  • In theory, could an object like 'Oumuamua have been captured by a three-body interaction with the sun and planets?
  • Can pedestrians and cyclists board shuttle trains in the Channel Tunnel?
  • Chord definition misunderstanding
  • Numbering system of equations and specific lines therein
  • Why are the titles of certain types of works italicized?
  • Is there racial discrimination at Tbilisi airport?
  • Are automorphisms of matrix algebras necessarily determinant preservers?
  • How to determine if a set is countable or uncountable?
  • How does one go about writing papers as a nobody?
  • How did the cop infer from Uncle Aaron's statement that Miles has been visiting?
  • How to justify a ban on exclusivist religions?
  • How to ensure a BSD licensed open source project is not closed in the future?
  • Do mini-humans need a "real" Saturn V to reach the moon?
  • Miracle Miracle Octad Generator Generator
  • Meaning of capacitor "× 2" symbol on data sheet schematic
  • Is it possible to approximately compile Toffoli using H and CSWAP?
  • Version of Dracula (Bram Stoker)
  • Does my AC vent air from the room to outside?
  • How can one says that a particle IS a representation of some group?
  • When a submarine blows its ballast and rises, where did the energy for the ascent come from?
  • Tenses change the meaning
  • How can I address my colleague communicating with us via chatGPT?
  • Are there any original heat shield tiles on any of the retired space shuttles that flew to space?

powerpoint presentation macro enabled

ShapeChef

  • Frequently Asked Questions (FAQ)

Understanding PowerPoint File Formats

It’s possible to use PowerPoint for years without ever thinking about the various file formats that are available to you. By learning about PowerPoint’s file formats and options, however, you can do a much more effective job of creating presentations, backing them up, sharing them with colleagues, and protecting the information that they contain.

Ordinary PowerPoint Presentations

When you save a simple PowerPoint presentation, you give it a name, and PowerPoint adds the file extension .pptx. Your Sales Presentation file becomes Sales Presentation.pptx .

If your PowerPoint presentation contains one or more macros, PowerPoint will automatically detect their presence and save your presentation as a .pptm file. You can force PowerPoint to save a presentation that includes macros as a .pptx file, but PowerPoint won’t let you play the macros that you’ve included in your slide slow. So it’s best to let it save your file with the .pptm extension.

PowerPoint File Formats

If you need to share your presentation with a colleague who is using an older version of PowerPoint, then save your slides as a .ppt file. PowerPoint 97 through 2003 cannot open and process .pptx or .pptm files.

If you’re using PowerPoint 2007 or newer, you should always save your work in .pptx format (or in .pptm format if you’ve used macros in your presentation). The options described below are additional ways to save your work. Be sure to save them first as ordinary .pptx or .pptm files before you save them in any of these other formats.

PowerPoint Shows

If you want to give your PowerPoint presentation to a friend or colleague, and you don’t want them to change anything, then save your presentation as a PowerPoint Show file. Your colleagues can display your slides, but they will be unable to change any part of your presentation.

There are three types of PowerPoint Shows: Save an ordinary presentation as a .ppsx file. If you’re using macros in your presentation, save it as a .ppsm file. If you’re sending your slide show to somebody who is using PowerPoint 97 through 2003, then create a .pps PowerPoint Show file.

Be sure to save your presentation as a plain vanilla (.pptx) file or as a macro-enabled (.pptm) file. If you’ve only saved the Show file, you won’t be able to make changes to your presentation.

PowerPoint Picture Presentations

Picture Presentations add an additional layer of protection to your work. To the casual observer, a PowerPoint Picture Presentation looks like an ordinary PowerPoint slideshow. But when you save your work as a Picture Presentation, each slide is converted to a simple image.

Slides contain text objects, image objects, animations, transitions, and many other special effects. By contrast, Picture Presentations contain only snapshots of your slides.

If somebody wants to copy your work, they can see each of the images and retype the text. They can even grab (and re-crop) the images. But they cannot capture any of the magic that is PowerPoint.

If you create a Picture Presentation, be sure to give it a unique name. If you only save the Picture Presentation .pptx file, you won’t be able to modify your presentation in the future.

Windows Media Videos

You can convert your PowerPoint presentation to an ordinary Windows Media Video (.wmv) file, and play it using the built-in Windows Media Player or any other video player. Your .wmv file can be enjoyed by any Windows or Mac user, even if they don’t have PowerPoint installed on their computer.

As always, don’t make your .wmv file the only version of your slideshow or you’ll be very disappointed when you want to make changes to the presentation.

Outline/RTF

PowerPoint lets you turn your slideshow into plain text. This is handy if you want to move some of the presentation’s text to your website or blog.

When you create a rich text format (.rtf) file, you save only the text. You lose all of the images, animations, slide-to-slide transitions, and other non-text objects.

It’s easy to save your presentation as a portable document format (.pdf) file. These .pdf files can be opened on any Windows, Mac, Unix/Linux, iOS, or Android device. The resulting file, however, is a static document. Don’t expect to see slides fade in and out. All of your animated objects will become static.

You can save your slides as an XML Paper Specification (.xps) file. That’s a fancy way to say that if you double-click your .xps file in Windows Explorer, the operating system will open your file using its built-in XPS Viewer.

The XPS format is ideal for sending your slideshow to users who have neither PowerPoint nor Adobe Acrobat Reader installed on their computers. As with the .pdf format above, .xps files have text and images, but no animation.

If you’re happy with this year’s Financial Results slideshow, and you want to create next year’s presentation using the same colors and fonts, then save your current presentation as a template, and use it over and over.

As you may have guessed, save your work as a .potx file for use in PowerPoint 2007 and newer, as a .potm file for a 2007 or newer macro-enabled presentation, and as a .pot file for use on PowerPoint 97 through 2003.

Office Themes and Backups

Because Microsoft PowerPoint is part of Microsoft Office, you can use two Office file types to make your PowerPoint work easier and safer.

You can save your presentation theme as an Office .thmx file. Future PowerPoint presentations, as well as Word documents and Excel spreadsheets, can use this Office theme to set their fonts and colors. This results in a consistent look and feel to all of the Office documents that you present to prospects and customers.

Autosave is built into most Office applications, including PowerPoint. If you experienced a power outage and hadn’t saved your PowerPoint presentation before you lost power, it’s possible that there’s a recent version of your slideshow in the Office Autosave library. If you click File , click Open , and click Recover Unsaved Presentation , you may be pleased by the information that PowerPoint saved for you.

The Bottom Line

There’s no need to memorize all of the PowerPoint file extensions and options that are available. But be sure that you’re including all of these files when you do your regular on-site and off-site backups. And bookmark this blog page so that you can return to it when you need to save or open a PowerPoint presentation in one of the less popular file formats.

  • September 20, 2014

About ShapeChef

ShapeChef: Graphic and Chart Library for PowerPoint

Blog Categories

  • Slides and Objects
  • Video and Audio
  • Presentation Tips and Techniques

Copyright © 2024 Wulfsoft. All rights reserved.

  • Terms of Service
  • Legal Notice

powerpoint presentation macro enabled

Save a presentation that contains VBA macros

Macros can be created for PowerPoint using Visual Basic for Applications (VBA). A presentation that contains VBA macros must be saved with a different file-name extension than a regular presentation file (such as .pptx, .potx, or .ppsx) that has no macros in it.

To save a presentation that contains VBA macros, do the following:

Click the File tab, and then click Save As .

In the Save as type list, select one of the following:

PowerPoint Macro-Enabled Presentation     A presentation with a .pptm file name extension that can contain VBA code.

PowerPoint Macro-Enabled Show     A show with a .ppsm file name extension that includes pre-approved macros that you can run from within your presentation.

PowerPoint Macro-Enabled Design Template     A template with a .potm file name extension that includes pre-approved macros that you can add to a template and use in your presentation.

Click Save .

Facebook

Need more help?

Want more options.

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

powerpoint presentation macro enabled

Microsoft 365 subscription benefits

powerpoint presentation macro enabled

Microsoft 365 training

powerpoint presentation macro enabled

Microsoft security

powerpoint presentation macro enabled

Accessibility center

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

powerpoint presentation macro enabled

Ask the Microsoft Community

powerpoint presentation macro enabled

Microsoft Tech Community

powerpoint presentation macro enabled

Windows Insiders

Microsoft 365 Insiders

Was this information helpful?

Thank you for your feedback.

IMAGES

  1. What Is a Macro-Enabled PowerPoint Presentation?

    powerpoint presentation macro enabled

  2. How to Enable Macros in PowerPoint

    powerpoint presentation macro enabled

  3. How to use macro in Microsoft Powerpoint 2016

    powerpoint presentation macro enabled

  4. How to Use PowerPoint Macros

    powerpoint presentation macro enabled

  5. What is a Macro?

    powerpoint presentation macro enabled

  6. enable-macros-in-powerpoint-2016

    powerpoint presentation macro enabled

COMMENTS

  1. How to Enable Macros in PowerPoint (with Screenshots)

    Click Trust Center. This is at the bottom of the menu in the window that pops up. 5. Click Trust Center Settings. You'll see this on the right side of the window under the header, "Microsoft PowerPoint Trust Center." 6. Click Macro Settings. It's near the middle of the menu on the left side of the window. 7.

  2. What Is a Macro-Enabled PowerPoint Presentation?

    A macro-enabled PowerPoint presentation is a presentation that uses macros. Microsoft Office 2007 began to implement security enhancements to protect against malicious threats, including offering two file types in PowerPoint presentations: .pptx and .pptm. To effectively implement them, users need to understand security risks associated with ...

  3. Run a macro in PowerPoint

    With the Developer tab visible: On the Developer tab, in the Code group, click Macros. In the Macro dialog box, under Macro name, select the macro that you want, and then click Run. For information about the security risks of macros and enabling or disabling macros in presentations in the Trust Center, see Enable or disable macros in Office ...

  4. What Is a Macro-Enabled PowerPoint Presentation?

    A PowerPoint macro enabled presentation is a file format that allows users to embed small programs called "macros" within their slides. Macros are sets of instructions or code written in Visual Basic for Applications (VBA) that automate repetitive tasks, add interactivity, and enhance functionality within the presentation. ...

  5. How to Enable Macros in PowerPoint: A Step-by-Step Guide

    When saving a macro-enabled presentation, select File > Save As. In the Save as type dropdown, choose PowerPoint Macro-Enabled Presentation (*.pptm). This format retains the macros. To close a macro-enabled presentation, just save your changes and exit PowerPoint. Ensuring macros are enabled in the Trust Center can prevent issues from arising.

  6. Create a macro in PowerPoint

    Create or edit a macro. To create or edit a macro by using Visual Basic for Applications, do the following: On the View tab, choose Macros. In the Macro dialog box, type a name for the macro. In the Macro in list, click the template or the presentation that you want to store the macro in. In the Description box, type a description for the macro.

  7. Level Up Your Presentations: How to Enable VBA Macros in PowerPoint

    Take your PowerPoint presentations to the next level with the power of VBA macros! This beginner-friendly tutorial will guide you through creating and using ...

  8. How to Enable Macros in PowerPoint: A Step-by-Step Guide

    Macro-Enabled Presentations. As the name suggests, a macro-enabled presentation is a PowerPoint document that has macros embedded within it. Macros are small programs that automate repetitive tasks and enhance the functionality of the presentation. If you've created a macro in PowerPoint, you'll need to enable macros in order to use it.

  9. PowerPoint VBA Macro Examples & Tutorial

    This is a simple example of a PowerPoint VBA Macro: Sub SavePresentationAsPDF() Dim pptName As String Dim PDFName As String ' Save PowerPoint as PDF. pptName = ActivePresentation.FullName. ' Replace PowerPoint file extension in the name to PDF. PDFName = Left(pptName, InStr(pptName, ".")) & "pdf".

  10. How to use VBA in PowerPoint: A beginner's guide

    Getting to meet your VBA friend is very simple. With PowerPoint open and at least one presentation file open, press Alt+F11* on your keyboard. This will open the VBE (Visual Basic Editor): *If for some reason Alt+F11 isn't mapped on your keyboard you can right click anywhere on the ribbon, select Customize the Ribbon… and in the window that ...

  11. Enable or disable macros in Microsoft 365 files

    The macro settings are not changed for all your Microsoft 365 apps. Select the File tab and choose Options. Select Trust Center, and then choose Trust Center Settings. In the Trust Center, select Macro Settings. Tip: If you have the developer tab on your ribbon, select the Developer tab and then choose Macro Security to open the Trust Center ...

  12. Creating macros in Powerpoint 2016 / 365 / 2019 presentations

    From the PowerPoint Ribbon, hit Developer. Then hit the Visual Basic button. The VBA editor will open up. Now, from the project tree, highlight the VBAProject entry. Now from the header menu hit Insert and select Module. Type the following code into the newly created module. This small macro adds a new slide into the second position in your ...

  13. Macros in PowerPoint: Full Tutorial

    1) Keyboard Shortcuts - There is no easy way to assign keyboard shortcuts to macros; you must activate them through the "Macros" menu in the Developer Toolbar. 2) Macro-Enabled Files - While you can save macros with the above method, it is not ideal for sharing them or making them usable across different presentations.

  14. PPTM File (What It Is and How to Open One)

    A PPTM file is a macro-enabled presentation file created by PowerPoint. View and edit one for free with WPS Office, PowerPoint Online, or Google Slides. Convert to PDF with FileZigZag, or use PowerPoint to save to PPTX, MP4, etc. This article explains what PPTM files are, all the different ways you can view or edit one, and how to convert the ...

  15. How do I get rid of the macros from a Powerpoint?

    Laura. By definition, PPTX files *cannot* contain macros, so all you really need to do is File | Save As then choose PPTX as the Save As type, give the presentation a name and save it. PowerPoint will give you a warning that PPTX files can't contain macros and is it ok to remove them ... and of course you'll say "You betcha" since that's what ...

  16. Saving ppt to pptx or pptm

    Here, Save is the macro which is present in the presentation. Steps to convert .ppt (macros enabled presentation) to .pptm. Open the identified .ppt file which contains macros. Navigate to File > Save As > Browse - which will open the below window. Make sure you are in the right path to save the workbook > Choose PowerPoint Macro-Enabled ...

  17. How to auto execute a macro when opening a Powerpoint presentation

    Start PowerPoint from command line and use the /M switch to have PowerPoint run a specified macro when it starts a named presentation file. The easiest way to do this is to create a shortcut to the PowerPoint application. Then go to the Properties window for the shortcut and select the Shortcut tab. Next, add the /M switch, your presentation ...

  18. Understanding PowerPoint File Formats

    If your PowerPoint presentation contains one or more macros, PowerPoint will automatically detect their presence and save your presentation as a .pptm file. ... as a .potm file for a 2007 or newer macro-enabled presentation, and as a .pot file for use on PowerPoint 97 through 2003. Office Themes and Backups. Because Microsoft PowerPoint is part ...

  19. File formats that are supported in PowerPoint

    A PowerPoint presentation template that you can use to format future presentations. PowerPoint Macro-Enabled Design Template.potm. A template that includes pre-approved macros that you can add to a template to be used in a presentation. PowerPoint Show.ppsx. A presentation that always opens in Slide Show view rather than in Normal view.

  20. Save a presentation that contains VBA macros

    To save a presentation that contains VBA macros, do the following: Click the File tab, and then click Save As. In the Save as type list, select one of the following: PowerPoint Macro-Enabled Presentation A presentation with a .pptm file name extension that can contain VBA code. PowerPoint Macro-Enabled Show A show with a .ppsm file name ...

  21. Powerpoint 2016: Open slide show automattically in Macro-enabled

    I have a macro-enabled presentation running in Kiosk mode. How do I get the slide show to run automatically when users opens ppt (So that they don't have to use ribbon [Slideshow from the beginning] option. I can't save as Powerpoint Show as macros are needed? Can anyone advise? Many thanks. Lisa