Pausing a Powerpoint animation

Hi all,

I have a ppt with lots of custom animation and slide transitions. You can watch the whole thing like a movie, without having to click once.

Sometimes, when I give this presentation, there are questions and I need to pause the presentation. For this, I'm using the code in the code snippet below, and two shapes that are located on the slide master.

But, when I click a shape, the current slides starts from the beginning as soon as

    .Presentation.SlideMaster.Shapes("pause").ZOrder msoSendToBack

is executed.

I don't want that. I want to pause and then continue at exactly the same spot. As a workaround, I can place the Pause and  Resume shapes next to each other and comment out the msoSendToBack lines in the code. But, since in the real presentation, the shapes will be white on white, i.e. invisible, I'd just want to make them really big and then be able to click anywhere in the screen to pause and click anywhere again to resume.

Any idea how to do that?

cheers, teylyn
Option Explicit

Sub PauseShow()
With SlideShowWindows(1)
    .View.State = ppSlideShowPaused
    .Presentation.SlideMaster.Shapes("pause").ZOrder msoSendToBack
End With
End Sub

Sub ResumeShow()
With SlideShowWindows(1)
    .View.State = ppSlideShowRunning
    .Presentation.SlideMaster.Shapes("resume").ZOrder msoSendToBack
End With
End Sub

Open in new window

LVL 50
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Another solution to pausing the presentation is simply using the "Black Screen" feature in PowerPoint. Just hit the "B" key on the keyboard and PowerPoint will pause the presentation and any animation in progress and display a black screen so that you can answer the question without any distraction behind you. Once you are completed, hitting the "B" key returns you to your presentation right where you left off, even in the middle of any animation.
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelAuthor Commented:
I don't want to black the screen. For one, it will be more distracting than just freezing the image, and also, I may need to point to elements that are visible on the screen to explain concepts.
Another solution is using Ctrl-p for pause and Ctrl-a for resume
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

I see, in that case you can press any of the number keys along the top of the keyboard (I use the number 1 key) and it will pause the animation. When you want to continue, just hit the tilde key (  `  ) to resume the animation.
Since the shapes will be invisible, you can just create 1 shape and toggle between pause and running when clicked.
With SlideShowWindows(1)
    If .View.State = ppSlideShowPaused Then
        .View.State = ppSlideShowRunning
        .View.State = ppSlideShowPaused
    End If
    '.Presentation.SlideMaster.Shapes("pause").ZOrder msoSendToBack
End With

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelAuthor Commented:
Thomasian, that's it!
I can now walk away from the keyboard and pause the screen by clicking a button on my wireless mouse. Thanks.

footinch, the number 1 works, but the ` key gives a beep on restart.
HiepTest, thank you, that works as well.

I also found that simply pressing S will stop and restart, too.

But since I want to be away from the keyboard, the points go to Thomasian.

Thanks all.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft PowerPoint

From novice to tech pro — start learning today.