Share via


PropertyEffect Interface

Represents a property effect for an AnimationBehavior object.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
<GuidAttribute("914934E9-5A91-11CF-8700-00AA0060263B")> _
Public Interface PropertyEffect
'Usage
Dim instance As PropertyEffect
[GuidAttribute("914934E9-5A91-11CF-8700-00AA0060263B")]
public interface PropertyEffect

Examples

Use the PropertyEffect property of the AnimationBehavior object to return a PropertyEffect object. The following example refers to the property effect for a specified animation behavior.

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

   .Behaviors(1).PropertyEffect

Use the Points property to access the animation points of a particular animation behavior. If you want to change only two states of an animation behavior, use the From and To properties. This example adds a new shape to the and sets the property effect to animate the fill color from blue to red.

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

See Also

Reference

PropertyEffect Members

Microsoft.Office.Interop.PowerPoint Namespace