确定文本是否按相反的顺序动画显示。返回一个代表文本动画的 Effect 对象。
expression.ConvertToAnimateInReverse(Effect, animateInReverse)
expression 必选。该表达式返回一个 Sequence 对象。
Effect 必选。Effect 类型。应用反向的动画效果。
animateInReverse 必选。MsoTriState 类型。确定文本动画的顺序。
MsoTriState 可以是下列 MsoTriState 类型常数之一。 |
msoCTrue |
msoFalse 文本按正常顺序动画显示。 |
msoTriStateMixed |
msoTriStateToggle |
msoTrue 文本按相反顺序动画显示。 |
本示例在幻灯片上创建一个带文本的形状并向该形状中添加一个随机动画,并确保形状的文本按相反顺序动画显示。
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