次の方法で共有


RotationEffect.By プロパティ (PowerPoint)

1 つ を度の単位でオブジェクトの回転角度を表すを取得または設定などの値が 180 の場合はオブジェクトを 180 度回転します。 値の取得と設定が可能です。

構文

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

関連項目

RotationEffect オブジェクト

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

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