FilterEffect Object (PowerPoint)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents a filter effect for an animation behavior.

Use the FilterEffect property of the AnimationBehavior object to return a FilterEffect object. Filter effects can be changed using the FilterEffect object's Reveal, SubType, and Type properties.

The following example adds a shape to the first slide of the active presentation and sets a filter effect animation behavior.

Sub ChangeFilterEffect()

    Dim sldFirst As Slide

    Dim shpHeart As Shape

    Dim effNew As Effect

    Dim bhvEffect As AnimationBehavior

    Set sldFirst = ActivePresentation.Slides(1)

    Set shpHeart = sldFirst.Shapes.AddShape(Type:=msoShapeHeart, _

        Left:=100, Top:=100, Width:=100, Height:=100)

    Set effNew = sldFirst.TimeLine.MainSequence.AddEffect _

        (Shape:=shpHeart, EffectID:=msoAnimEffectChangeFillColor, _


    Set bhvEffect = effNew.Behaviors.Add(msoAnimTypeFilter)


    With bhvEffect.FilterEffect

         .Type = msoAnimFilterEffectTypeWipe

         .Subtype = msoAnimFilterEffectSubtypeUp

         .Reveal = msoTrue

    End With

End Sub