RotationEffect オブジェクト (PowerPoint)

AnimationBehavior オブジェクトの回転効果を表します。

AnimationBehavior オブジェクトの RotationEffect プロパティを使用して、RotationEffect オブジェクトを取得します。 次の使用例は、指定したアニメーション動作の回転効果を参照します。

ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).RotationEffect

RotationEffect オブジェクトの By プロパティ、From プロパティ、To プロパティを使用して、オブジェクトのアニメーションの回転に影響を与えます。 次の例では、最初のスライドに新しい図形を追加し、回転のアニメーション動作を設定します。

Sub AddRotation()

    Dim shpNew As Shape
    Dim effNew As Effect
    Dim aniNew As AnimationBehavior

    Set shpNew = ActivePresentation.Slides(1).Shapes _
        .AddShape(Type:=msoShape5pointStar, Left:=0, _
        Top:=0, Width:=100, Height:=100)

    Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _
        .AddEffect(Shape:=shpNew, effectId:=msoAnimEffectCustom)
    Set aniNew = effNew.Behaviors.Add(msoAnimTypeRotation)

    With aniNew.RotationEffect
        'Rotate 270 degrees from current position
        .By = 270
    End With

End Sub

関連項目

PowerPoint Object Model Reference

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。