次の方法で共有


MotionEffect.FromY プロパティ (PowerPoint)

取得または設定、 1 つ の画面の幅に対する割合として指定された、 MotionEffect オブジェクトの垂直方向の位置を表す。 値の取得と設定が可能です。

構文

FromY

MotionEffect オブジェクトを表す変数。

戻り値

1 行

注釈

このプロパティの既定値は、 である場合、オブジェクトの現在の位置が使用されています。

サイズを変更したり、別の位置にジャンプする ToY プロパティと組み合わせてこのプロパティを使用します。

プロパティを使用して からColorEffectRotationEffect 、または PropertyEffect オブジェクトの設定や、それぞれの色、回転、またはアニメーション動作が、他のプロパティを変更するために使用するには、このプロパティを混同しないでください。

次の使用例は、アニメーションの軌跡を追加し、水平および垂直の開始位置と終了位置を設定します。

Sub AddMotionPath()

    Dim effCustom As Effect
    Dim animMotion As AnimationBehavior
    Dim shpRectangle As Shape

    'Adds shape and sets effect and animation properties
    Set shpRectangle = ActivePresentation.Slides(1).Shapes _
        .AddShape(Type:=msoShapeRectangle, Left:=100, _
        Top:=100, Width:=50, Height:=50)

    Set effCustom = ActivePresentation.Slides(1).TimeLine.MainSequence _
        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectCustom)

    Set animMotion = effCustom.Behaviors.Add(msoAnimTypeMotion)

    'Sets starting and ending horizontal and vertical positions
    With animMotion.MotionEffect
        .FromX = 0
        .FromY = 0
        .ToX = 50
        .ToY = 50
    End With

End Sub

関連項目

MotionEffect オブジェクト

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

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