Powerpoint Alchemy Amazing techniques and tips
Amazing techniques which will transform your use of PowerPoint presentations. Make your presentation stand out from the crowd!

About

Modifying Animations with vba

If you haven't already read How to Use vba Code you should do this first.

Sometimes the great animation effect that you once loved can start to look a little crass. If you have lots of slides with fly in text and decide that maybe fade would look a little more "mature" it will take ages to change it all.

THIS CODE IS FOR XP - 2007 ONLY

This vba does it in one go:

Sub aniswap()
Dim osld As Slide
Dim i As Integer
Dim bExit As Boolean
Dim oeff As Effect
For Each osld In ActivePresentation.Slides
If osld.TimeLine.MainSequence.Count > 0 Then
For i = 1 To osld.TimeLine.MainSequence.Count
If osld.TimeLine.MainSequence(i).EffectType =msoAnimEffectFly Then
Set oeff = osld.TimeLine.MainSequence(i)
bExit = oeff.Exit
oeff.EffectType = msoAnimEffectFade ' OR msoAnimEffectAppear
oeff.Exit = bExit
End If
Next i
End If
Next osld
End Sub

For other animation swaps you will need to change the EffectType :

Some popular types :

msoAnimEffectBox
msoAnimEffectDescend
msoAnimEffectDissolve
msoAnimEffectFadedZoom
msoAnimEffectBounce
msoAnimEffectEaseIn

Change EVERYTHING to Fade or Appear - probably much nicer!

Sub aniswap2()
Dim osld As Slide
Dim i As Integer
Dim bExit As Boolean
Dim oeff As Effect
For Each osld In ActivePresentation.Slides
If osld.TimeLine.MainSequence.Count > 0 Then
For i = 1 To osld.TimeLine.MainSequence.Count
If osld.TimeLine.MainSequence(i).EffectType < 52 Then ' all entrance & exits
Set oeff = osld.TimeLine.MainSequence(i)
bExit = oeff.Exit
oeff.EffectType = msoAnimEffectFade ' OR msoAnimEffectAppear
oeff.Exit = bExit
End If
Next i
End If
Next osld
End Sub



 


This website is sponsored by Technology Trish Ltd
© Technology Trish 2007
Registered in England and Wales No.5780175