K
Kevin Dufendach
I'm using the following code do set the selected objects as "animate
with previous" (equivalent to going [slide show] --> [custom
animation] --> [add effect] --> [entrance] --> [appear] --> [with
previous]). However, whenever I run the
oShape.AnimationSettings.Animate = msoTrue line, any previously
animated objects' timings get reset to 0.5, so there's a delay. Am I
doing something wrong? Is there a better way to animate objects?
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SetSelectedToAnimateAfterPrev()
Dim oShape As Shape
Dim oAnimObject As Object
On Error GoTo OnError
'Set Selected = ActiveWindow.Selection ' uncomment this line for
debugging purposes
For Each oShape In ActiveWindow.Selection.ShapeRange
oShape.AnimationSettings.Animate = msoTrue
'After previous line, the previously animated shapes' timings
get reset to 0.5
oShape.AnimationSettings.AdvanceMode = ppAdvanceOnTime
oShape.AnimationSettings.AdvanceTime = 0
For Each oAnimObject In
ActiveWindow.Selection.SlideRange.TimeLine.MainSequence
If oAnimObject.Shape.Name = oShape.Name Then
oAnimObject.Timing.TriggerType =
msoAnimTriggerWithPrevious
oAnimObject.Timing.Duration = 0.001
End If
Next oAnimObject
Next oShape
OnError:
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
with previous" (equivalent to going [slide show] --> [custom
animation] --> [add effect] --> [entrance] --> [appear] --> [with
previous]). However, whenever I run the
oShape.AnimationSettings.Animate = msoTrue line, any previously
animated objects' timings get reset to 0.5, so there's a delay. Am I
doing something wrong? Is there a better way to animate objects?
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SetSelectedToAnimateAfterPrev()
Dim oShape As Shape
Dim oAnimObject As Object
On Error GoTo OnError
'Set Selected = ActiveWindow.Selection ' uncomment this line for
debugging purposes
For Each oShape In ActiveWindow.Selection.ShapeRange
oShape.AnimationSettings.Animate = msoTrue
'After previous line, the previously animated shapes' timings
get reset to 0.5
oShape.AnimationSettings.AdvanceMode = ppAdvanceOnTime
oShape.AnimationSettings.AdvanceTime = 0
For Each oAnimObject In
ActiveWindow.Selection.SlideRange.TimeLine.MainSequence
If oAnimObject.Shape.Name = oShape.Name Then
oAnimObject.Timing.TriggerType =
msoAnimTriggerWithPrevious
oAnimObject.Timing.Duration = 0.001
End If
Next oAnimObject
Next oShape
OnError:
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''