FindFirstAnimationFor Method

Microsoft PowerPoint Visual Basic

object that represents the first animation for a given shape.

expression.FindFirstAnimationFor(Shape)

expression    Required. An expression that returns one of the objects in the Applies To list.

Shape   Required Shape object. The shape for which to find the first animation.

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