How to Add Extra Delay to PowerPoint Animations with VBA
Question details
The user wants to programmatically add a fixed amount of extra delay to existing animations across all presentation slides using a VBA macro without losing the current relative timings.

- Product
- PowerPoint / WPS Presentation
- Device & OS
- not provided
- Scenario
- Editing a presentation with multiple animations where global timing adjustments are needed, and manual slide-by-slide modification is too tedious.
- Observed behavior
- Animations currently possess specific timings. The goal is to automate the addition of a consistent delay while ignoring the first animation or automatically starting sub-animations.
Before running any VBA macros, always create a backup copy of your presentation to ensure you can easily revert to the original animation timings if the macro does not produce the desired result.
Create a VBA Macro to Add Delay to All Animations
Write and execute a VBA script that iterates through all slides and effects to increase the animation delay globally.
By looping through the Timeline MainSequence of each slide, you can individually adjust the TriggerDelayTime for every animation effect without destroying their existing sequence.
Launch your presentation and press ALT + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor.
Click on 'Insert' in the top menu bar, then select 'Module' to create a new blank scripting window.
Paste a VBA script designed to loop through 'ActivePresentation.Slides' and 'Slide.TimeLine.MainSequence', adding your desired number of seconds to 'Effect.Timing.TriggerDelayTime'.
Close the VBA editor, return to your presentation view, and press ALT + F8. Select your new macro from the list and click 'Run'.

Create a Backup and Restore Macro for Timings
Use a secondary macro to save the initial delays so you can undo changes programmatically if the delay macro fails.
Easily Manage VBA Macros with WPS Presentation
WPS Presentation fully supports VBA macros, allowing you to automate tedious tasks like adjusting animation delays across your entire slideshow with ease and precision.
- 1. Install WPS Office: Download and install the free version of WPS Office from the official website.
- 2. Open Your File: Launch WPS Presentation and open your slideshow.
- 3. Access the Developer Tools: Navigate to the 'Tools' tab and click on 'Macros' or 'VBA Editor' to open the scripting environment.
- 4. Run Your Animation Script: Insert your delay-adding script into a new module, save the document, and run the macro to instantly update your animations.

Frequently Asked Questions
Can I undo a VBA macro execution in PowerPoint?
The standard 'Undo' command (Ctrl+Z) usually does not work for actions performed by VBA macros. It is highly recommended to either test your scripts on a copy of the presentation or write a secondary macro designed specifically to restore the original timing values.
Why did the macro change my automatic slide transitions?
If your macro does not specifically target animation effects (the MainSequence), it might inadvertently alter slide transition timings. Ensure your VBA code only loops through 'TimeLine.MainSequence' rather than slide transition properties.
Why is my VBA code not running in the presentation?
Your file might not be saved in a macro-enabled format, or your macro security settings might be blocking execution. Save the file as a .pptm (or equivalent macro-enabled presentation format) and adjust the Trust Center settings to allow macros to run.




