How to delete all the animations in a PowerPoint presentation using VBA

Very useful! This answer is copied from here. I tried to archive it, but archive.org wasn’t able to save it for some reason. I am posting it here so it can be archived for posterity.

answerspleasee asked on October 19, 2010
 Q:
 How to delete all the animations in a presentation
 heyehy

how do I delete all animations i have put on for the past 200 slides.

k.thanks.bye

Shyam Pillai replied on October 19, 2010
 MVP
 A:
 Hi,

You can turn off the animations by going to Setup Slide Show and under Show Options tick the Show without animation option and click OK. Now run the show and it will display without the animations.

If you really want to delete all the animations in a single sweep then you will need to run this macro.

Sub StripAllBuilds()
 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
End Sub

Regards, Shyam Pillai. http://skp.mvps.org
 Regards
 Shyam Pillai

http://skphub.com

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.