Sequence.FindFirstAnimationFor method (PowerPoint)

Returns an Effect object that represents the first animation for a given shape.

Syntax

expression. FindFirstAnimationFor( _Shape_ )

expression A variable that represents a Sequence object.

Parameters

Name Required/Optional Data type Description
Shape Required Shape The shape for which to find the first animation.

Return value

Effect

Example

The following example finds and deletes the first animation for a the first shape on the first slide. This example assumes that at least one animation effect exists for the specified shape.

Sub FindFirstAnimation()

    Dim sldFirst As Slide
    Dim shpFirst As Shape
    Dim effFirst As Effect

    Set sldFirst = ActivePresentation.Slides(1)
    Set shpFirst = sldFirst.Shapes(1)

    Set effFirst = sldFirst.TimeLine.MainSequence _
        .FindFirstAnimationFor(Shape:=shpFirst)

    effFirst.Delete

End Sub

See also

Sequence Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.