Reputation: 1449
I have a powerpoint presentation (pwpt 2021) where several animations are displayed while diaporama mode is activated with F5
.
At the end of the presentation, we usually go through each slide on diaporama mode (F5
still activated).
The issue is that each animation, for example appear
, has to animate everytime we go through each slide (it appears
when you go forward and disapears
when you go backward). Optimally it would only appear
once and stay still.
Is there a way to only activate animations once during a presentation so that we can go back to each slide without disturbing the diaporama lecture? (with or without encoding)
Here is an example of what currently happens:
And this is what I would love to see when I go back to the previous slides during the presentation:
Overall it would be like that during a presentation:
Macro attempt
As a novice in VBA, I took my inspiration from the following topic (based on Bradipo comment):
https://www.thespreadsheetguru.com/vba/powerpoint-vba-remove-all-animation-effects
So I created 3 slides with an animation on the second slide.
I incorporated the following code in a macro:
Sub RemoveAllAnimations()
'PURPOSE: Remove All PowerPoint Animations From Slides
'SOURCE: www.TheSpreadsheetGuru.com/the-code-vault
Dim sld As Slide
Dim x As Long
Dim Counter As Long
'Loop Through Each Slide in ActivePresentation
For Each sld In ActivePresentation.Slides
'Loop through each animation on slide
For x = sld.TimeLine.MainSequence.Count To 1 Step -1
'Remove Each Animation
sld.TimeLine.MainSequence.Item(x).Delete
'Maintain Deletion Stat
Counter = Counter + 1
Next x
Next sld
'Completion Notification
MsgBox Counter & " Animation(s) were removed from you PowerPoint presentation!"
End Sub
When I executed the code, I had the message: "1 Animation(s) were removed from you PowerPoint presentation!".
This is nice but it killed the animations when diaporama mode was not activated with F5
, it just killed them all instead of removing them during the presentation.
Macro + button attempt
As suggested by Bradipo, I created a button in the very last slide and connected it to the macro.
F5
mode an click on the button at the end (great, it works!)The only remaining issue is that it kills the animations instead of just removing them during the presentation, meaning that I would have to re-create each animation afterward.
Upvotes: 0
Views: 434
Reputation: 466
From you last comment I understand that you would rather disable the animations, than delete them. I would then suggest you simply do not save the file after the animations are removed - thus keeping the above code I linked you from TheSpreadsheetGuru -, so the actions made by the Macro are only temporary. You may also Undo any action right after the removal, luckily PowerPoint does not act like Excel after a macro has done something.
Else, I made the below to toggle between animations on and off, however this works only with the presentation is in editing mode (that is, you have to exit presentation mode). Unfortunately it cannot be added to a button to use during the presentation. It is the same as clicking on Set Up Slide Show (below screenshots) and tick/untick the box. Such option, as well as the whole Set Up group, are all greyed out in Presentation Mode, and likely VBA cannot access such menu either unless while editing.
Sub ToggleAnimation()
If ActivePresentation.SlideShowSettings.ShowWithAnimation = msoFalse Then
ActivePresentation.SlideShowSettings.ShowWithAnimation = msoTrue
MsgBox "Animations are ON"
ElseIf ActivePresentation.SlideShowSettings.ShowWithAnimation = msoTrue Then
ActivePresentation.SlideShowSettings.ShowWithAnimation = msoFalse
MsgBox "Animations are OFF"
End If
End Sub
Upvotes: 1