ColorEffect Interface

Represents timing information about a slide animation.

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

Syntax

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

Examples

Use the AddEffect(Shape, MsoAnimEffect, MsoAnimateByLevel, MsoAnimTriggerType, Int32) method to add an effect. This example adds a shape to the first slide in the active presentation and adds an effect and a behavior to the shape.

Sub NewShapeAndEffect()

    Dim shpStar As Shape

    Dim sldOne As Slide

    Dim effNew As Effect



    Set sldOne = ActivePresentation.Slides(1)

    Set shpStar = sldOne.Shapes.AddShape(Type:=msoShape5pointStar, _

        Left:=150, Top:=72, Width:=400, Height:=400)

    Set effNew = sldOne.TimeLine.MainSequence.AddEffect(Shape:=shpStar, _

        EffectId:=msoAnimEffectStretchy, Trigger:=msoAnimTriggerAfterPrevious)

    With effNew

        With .Behaviors.Add(msoAnimTypeScale).ScaleEffect

            .FromX = 75

            .FromY = 75

            .ToX = 0

            .ToY = 0

        End With

        .Timing.AutoReverse = msoTrue

    End With

End Sub

To refer to an existing Effect object, use MainSequence (index), where index is the number of the Effect object in the Sequence collection. This example changes the effect for the first sequence and specifies the behavior for that effect.

Sub ChangeEffect()

    With ActivePresentation.Slides(1).TimeLine _

        .MainSequence(1)

        .EffectType = msoAnimEffectSpin

        With .Behaviors(1).RotationEffect

            .From = 100

            .To = 360

            .By = 5

        End With

    End With

End Sub

See Also

Reference

ColorEffect Members

Microsoft.Office.Interop.PowerPoint Namespace