PowerPoint) (Timing.AutoReverse 属性
决定某个效果是否应在正向播放结束后进行反向播放,从而使播放时间增加一倍。 读/写。
语法
expression。 AutoReverse
表达 一个代表 Timing 对象的变量。
返回值
MsoTriState
备注
AutoReverse 属性的值可以是其中一个 MsoTriState 常量。
常量 | 说明 |
---|---|
msoFalse | 默认值。 效果不会正向播放后再反向播放。 |
msoTrue | 效果正向播放后再反向播放。 |
示例
下面的示例添加一个形状并向其添加动画效果;然后将动画设置为正向播放结束后反向播放。
Sub SetEffectTiming()
Dim effDiamond As Effect
Dim shpRectangle As Shape
'Adds rectangle and applies diamond effect
Set shpRectangle = ActivePresentation.Slides(1).Shapes.AddShape _
(Type:=msoShapeRectangle, Left:=100, _
Top:=100, Width:=50, Height:=50)
Set effDiamond = ActivePresentation.Slides(1).TimeLine _
.MainSequence.AddEffect(Shape:=shpRectangle, _
effectId:=msoAnimEffectPathDiamond)
'Sets the duration of and reverses the effect
With effDiamond.Timing
.Duration = 5 ' Length of effect.
.AutoReverse = msoTrue
End With
End Sub
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。