Share via


Sequence.FindFirstAnimationFor Method

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

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

Syntax

'Declaration
Function FindFirstAnimationFor ( _
    Shape As Shape _
) As Effect
'Usage
Dim instance As Sequence
Dim Shape As Shape
Dim returnValue As Effect

returnValue = instance.FindFirstAnimationFor(Shape)
Effect FindFirstAnimationFor(
    Shape Shape
)

Parameters

Return Value

Type: Microsoft.Office.Interop.PowerPoint.Effect
Effect

Examples

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

Reference

Sequence Interface

Sequence Members

Microsoft.Office.Interop.PowerPoint Namespace