ScaleEffect 对象 (PowerPoint)
代表一个 AnimationBehavior 对象的缩放效果。
示例
使用 AnimationBehavior 对象的ScaleEffect属性返回一个 ScaleEffect 对象。 下面的示例引用了给定的动画动作的缩放效果。
ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).ScaleEffect
使用ByX 、ByY 、FromX 、FromY 、ToX和玩具ScaleEffect 对象的属性来操作对象的缩放比例。 本示例扩展由零开始增长的大小才能到达其初始大小的 100%的第一张幻灯片第一个形状。 本示例假定第一张幻灯片上有一个形状。
Sub ChangeScale()
Dim shpFirst As Shape
Dim effNew As Effect
Dim aniScale As AnimationBehavior
Set shpFirst = ActivePresentation.Slides(1).Shapes(1)
Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _
.AddEffect(Shape:=shpFirst, effectId:=msoAnimEffectCustom)
Set aniScale = effNew.Behaviors.Add(msoAnimTypeScale)
With aniScale.ScaleEffect
'Starting size
.FromX = 0
.FromY = 0
'Size after scale effect
.ToX = 100
.ToY = 100
End With
End Sub
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。