共用方式為


RotationEffect.From 屬性 (PowerPoint)

會設定或傳回 單一 表示以度為單位,相對於] 畫面上指定的起始角度 (例如 90 度為完全水平)。 讀取/寫入。

語法

expressionFrom

表達 代表 RotationEffect 物件的 變數。

註解

將這個屬性搭配 To 屬性使用,即可從某個旋轉角度轉換成另一個旋轉角度。

預設值為 在此情況下使用物件的目前位置。

請勿將此屬性與 FromXFromY 屬性的 ScaleEffectMotionEffect 物件,這用於調整效果或動作效果。

範例

下列範例會加入新的旋轉效果,並立即變更其旋轉角度。

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

另請參閱

RotationEffect 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應