That code should work unless you have triggers,
There is code here which will also kill triggers
http://www.pptalchemy.co.uk/PowerPoint_Delete_Animation.html
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm a secondary school teacher and have recently started a job teaching some distance ed and other online courses. One of the things I am doing is going through any powerpoints I have and stripping them of animations, because the online networking software we use doesn't support the animations and won't load a powerpoint with them.
I have been using this Macro I found online with some success, but am finding that it doesn't seem to work with every powerpoint, some it has no effect.
Dim I As Integer: Dim J As Integer
Dim oActivePres As Object
Set oActivePres = ActivePresentation
With oActivePres
For I = 1 To .Slides.Count
If Val(Application.Version) < 10 Then
' Older versions of PowerPoint 97/2000
' In each slide set the animation property
' of the Shape object to FALSE
For J = 1 To .Slides(I).Shapes.Count
.Slides(I).Shapes(J).AnimationSettings.Animate = msoFalse
Next J
Else
' New versions support the Timeline object
For J = .Slides(I).TimeLine.MainSequence.Count To 1 Step -1
.Slides(I).TimeLine.MainSequence(J).Delete
Next J
End If
Next I
End With
Set oActivePres = Nothing
I know I can go through and remove the animations manually, but it takes a very long time and I have a lot of powerpoints to go through. A lot.
Is there a better way to remove all animations from all slides in a powerpoint? I would appreciate any help.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
That code should work unless you have triggers,
There is code here which will also kill triggers
http://www.pptalchemy.co.uk/PowerPoint_Delete_Animation.html
Thank you!!
John,
You need to change the declaration in your code from:
Dim osld As Slide
to
Dim osld As Object
otherwise the code will through a compile error in older versions ( < 10)