Fix PowerPoint VBA Stops Working After Saving and Reopening
Question details
PowerPoint VBA macros fail to execute, disappear, or are blocked by security settings after saving and reopening a presentation.

- Product
- Microsoft PowerPoint
- Device & OS
- not provided
- Scenario
- A user creates or modifies VBA code in a PowerPoint presentation, saves the file, and later reopens it only to find that the macros no longer function or have completely disappeared.
- Observed behavior
- The VBA code either vanishes entirely from the Visual Basic Editor due to incorrect file formatting or is blocked from running by the application's Trust Center security policies.
Before troubleshooting, press Alt + F11 to open the Visual Basic Editor and check if your VBA code is still present; this will help determine if the issue is a file format problem or a security block.
Save as a Macro-Enabled Presentation (PPTM)
Saving your presentation in the correct macro-enabled format ensures that your VBA code is not stripped from the file upon saving.
If you save a presentation containing VBA code as a standard PPTX file, PowerPoint will automatically remove the macros. To preserve your code, the file must be saved with the PPTM extension.
Click on 'File' in the top-left corner of PowerPoint and select 'Save As' from the sidebar menu.
Click the file format dropdown menu below the file name input box.
Choose 'PowerPoint Macro-Enabled Presentation (*.pptm)' from the list of available formats.
Click 'Save'. If you previously lost your code by saving as a PPTX, you will need to paste the VBA script back into this new PPTM file.

Add the File Folder to Trusted Locations
Configuring Trusted Locations allows your macros to run securely without needing to enable all macros globally, which is a security risk.
Digitally Sign the VBA Project
If your company policy dictates that all macros must be digitally signed, untrusted macros will be silently disabled upon reopening.
Run Presentation Macros Seamlessly with WPS Office
If strict macro security settings or format compatibility issues are disrupting your workflow, WPS Office offers a powerful, user-friendly environment. WPS Presentation fully supports PPTM formats and provides an intuitive VBA editor, allowing you to run your presentation macros effortlessly.
- 1. Install WPS Office: Download and install the free version of WPS Office from the official website.
- 2. Open Your PPTM File: Launch WPS Presentation and open your macro-enabled (.pptm) presentation.
- 3. Enable Macros: If prompted by the security warning at the top of the screen, click 'Enable Macros'.
- 4. Run Your Code: Navigate to the 'Tools' tab, click on 'Macros', and execute your VBA scripts without complex Trust Center hurdles.

Frequently Asked Questions
Why did my VBA code completely disappear after reopening the presentation?
If your VBA code vanishes, it is almost always because the file was saved with the standard .pptx extension. The PPTX format does not support macros and automatically strips all VBA code upon saving. You must save the file as a Macro-Enabled Presentation (.pptm).
Is it safe to simply enable all macros in PowerPoint to fix this issue?
No, it is highly discouraged to select 'Enable all macros' in the Trust Center. Doing so leaves your computer vulnerable to malicious code embedded in files downloaded from the internet. Using 'Trusted Locations' is the recommended and secure alternative.
How do I bypass the 'Disable all macros except digitally signed macros' policy?
You cannot bypass this setting if it is enforced by your organization's IT department via Group Policy. To run your macros, you must either digitally sign the VBA project using a corporate certificate or save the file in a designated network Trusted Location approved by your administrator.
Can I use animations instead of VBA for simple text formatting?
Yes. Depending on what your VBA code is designed to do, built-in PowerPoint features like animations applied to preformatted text boxes can often achieve the same visual result without triggering macro security warnings.




