powerPoint) (RotationEffect.By 屬性
會設定或傳回 單一 的旋轉角度物件代表所指定的度數 ; 數例如,值為 180 表示由 180 度旋轉物件。 讀取/寫入。
語法
expression。 By
表達 代表 RotationEffect 物件的 變數。
註解
此指定物件在旋轉時,其中心點會保持在螢幕上的相同位置。
如果同時 由 和 以 屬性設定為新的旋轉效果,則會忽略 By 屬性的值。
浮點數 (如 55.5) 也一樣有效,但是負數則無效。
請勿將此屬性與 ByX 或 ByY 屬性的 ScaleEffect 和 MotionEffect 物件,這用於調整效果或動作效果。
範例
這個範例會加入新的旋轉效果,並變更其旋轉狀況。
Sub AddAndChangeRotationEffect()
Dim effBlinds As Effect
Dim tmlnShape As TimeLine
Dim shpShape As Shape
Dim animBehavior As AnimationBehavior
Dim rtnEffect As RotationEffect
'Sets shape, timing, and effect
Set shpShape = ActivePresentation.Slides(1).Shapes(1)
Set tmlnShape = ActivePresentation.Slides(1).TimeLine
Set effBlinds = tmlnShape.MainSequence.AddEffect _
(Shape:=shpShape, effectId:=msoAnimEffectBlinds)
'Adds animation behavior and sets rotation effect
Set animBehavior = tmlnShape.MainSequence(1).Behaviors _
.Add(Type:=msoAnimTypeRotation)
Set rtnEffect = animBehavior.RotationEffect
rtnEffect.By = 270
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。