Share via


PropertyEffect オブジェクト

Microsoft PowerPoint Visual Basic リファレンス

PropertyEffect オブジェクト

AnimationBehavior
PropertyEffect
AnimationPoints

AnimationBehavior オブジェクトのプロパティ効果を表します。

使い方

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

ActivePresentation.Slides(1).TimeLine.MainSequence.Item(1) _
   .Behaviors(1).PropertyEffect
		

特定のアニメーション動作のアニメーション ポイントにアクセスするには、Points プロパティを使用します。アニメーション動作の 2 つの状態だけを変更する場合は、From および To プロパティを使用します。次の使用例は、作業中のプレゼンテーションのスライド 1 に新しい図形を追加し、プロパティ効果を設定して、塗りつぶしの色を青から赤に変化するアニメーションを実行します。

Sub AddShapeSetAnimFill()

    Dim effBlinds As Effect
    Dim shpRectangle As Shape
    Dim animProperty As AnimationBehavior

    Set shpRectangle = ActivePresentation.Slides(1).Shapes _
        .AddShape(Type:=msoShapeRectangle, Left:=100, _
        Top:=100, Width:=50, Height:=50)
    Set effBlinds = ActivePresentation.Slides(1).TimeLine.MainSequence _
        .AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectBlinds)

    effBlinds.Timing.Duration = 3

    Set animProperty = effBlinds.Behaviors.Add(msoAnimTypeProperty)

    With animProperty.PropertyEffect
        .Property = msoAnimColor
        .From = RGB(Red:=0, Green:=0, Blue:=255)
        .To = RGB(Red:=255, Green:=0, Blue:=0)
    End With

End Sub