RotationEffect.From 属性 (PowerPoint)
设置或返回一个 单一 类型,以度为单位,指定相对于屏幕的起始角度 (例如,90 度为完全水平)。 读/写。
语法
expression。 From
表达 一个代表 RotationEffect 对象的变量。
备注
将该属性与 To 属性联合使用可从一个旋转角度转换到另一个旋转角度。
默认值为 空 ,在这种情况下使用对象的当前位置。
不要混淆此属性与 FromX 或 FromY 属性的 ScaleEffect 和 MotionEffect 对象,仅用于缩放或动画效果。
示例
以下示例添加一个旋转效果并立即更改其旋转角度。
Sub AddAndChangeRotationEffect()
Dim effBlinds As Effect
Dim tlnTiming As TimeLine
Dim shpRectangle As Shape
Dim animRotation As AnimationBehavior
Dim rtnEffect As RotationEffect
'Adds rectangle and sets effect and animation
Set shpRectangle = ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle, Left:=100, _
Top:=100, Width:=50, Height:=50)
Set tlnTiming = ActivePresentation.Slides(1).TimeLine
Set effBlinds = tlnTiming.MainSequence.AddEffect(Shape:=shpRectangle, _
effectId:=msoAnimEffectBlinds)
Set animRotation = tlnTiming.MainSequence(1).Behaviors _
.Add(Type:=msoAnimTypeRotation)
Set rtnEffect = animRotation.RotationEffect
'Sets the rotation effect starting and ending positions
rtnEffect.From = 90
rtnEffect.To = 270
End Sub
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。