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 |
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