Pausing your animations with VBA

Lets say if you are running a slide that has multiple animations on it. Halfway through the presentation, you may want to pause the animations to explain something. A simple way to do this is to press the “b” key which will black out the screen. Then, press “b” key again to resume the presentation. The downside is that you won’t be able to see the content on the screen.

To resolve this, you can make use of VBA. To do so, click Tools > Macro > Visual Basic Editor. Copy the code as shown below:

Sub pauseshow()
  ActivePresentation.SlideShowWindow.View.State = ppSlideShowPaused
End Sub

Sub runshow()
  ActivePresentation.SlideShowWindow.View.State = ppSlideShowRunning
End Sub

Close the editor once you are done.

Now, create two autoshapes.
Right click on the first one and select Action Settings. Select Run Macro > pauseshow. Click Ok.
Right click on the second one and select Action Settings. Select Run Macro > runshow. Click Ok.
Clicking on Shape 1 will now pause the presentation, while clicking on Shape 2 will resume the presentation.

5 thoughts on “Pausing your animations with VBA

  1. You are a truely amazing MVP of PPT. I knew what I wanted to do but had no clue how to proceed since I am a newbie in PPT. It took just a minute or so to solve a problem I have been wondering about in for a month.

    Many thanks

  2. Is there a way to pause only a specific animation without affecting the other animations in the same slide. i am asking cuse i am making a wheel spin for a game and to make it stop in a random position the pause works fine but i have other animations that are affected.

  3. Hi

    Thanks for this, it has helped me enormously. I was wondering if you know if it’s possible to run this and have a sound (say, a music track) continue on from where it was paused when you click resume?

    Many thanks,

    Steve

Leave a Reply

Your email address will not be published. Required fields are marked *