object representing the text animation.
expression.ConvertToAnimateInReverse(Effect, animateInReverse)
expression Required. An expression that returns a Sequence object.
Effect Required Effect object. The animation effect to which the reversal will apply.
animateInReverse Required MsoTriState. Determines the text animation order.
MsoTriState can be one of these MsoTriState constants. |
msoCTrue |
msoFalse The text animates in normal order. |
msoTriStateMixed |
msoTriStateToggle |
msoTrue The text animates in reverse order. |
Example
This example creates a shape with text on a slide and adds a random animation to the shape, ensuring the shape's text animates in reverse.
Sub AnimateInReverse()
Dim sldActive As Slide
Dim timeMain As TimeLine
Dim shpRect As Shape
' Create a slide, add a rectangular shape to the slide, and
' access the slide's animation timeline.
With ActivePresentation
Set sldActive = .Slides.Add(Index:=1, Layout:=ppLayoutBlank)
Set shpRect = sldActive.Shapes.AddShape(Type:=msoShapeRectangle, _
Left:=100, Top:=100, Width:=300, Height:=150)
Set timeMain = sldActive.TimeLine
End With
shpRect.TextFrame.TextRange.Text = "This is a rectangle."
' Add a random animation effect to the rectangle,
' and animate the text in reverse.
With timeMain.MainSequence
.ConvertToAnimateInReverse _
Effect:=.AddEffect(Shape:=shpRect, effectId:=msoAnimEffectRandom), _
AnimateInReverse:=msoTrue
End With
End Sub