Partager via


TimeLine.MainSequence Property (PowerPoint)

Returns a Sequence object that represents the collection of Effect objects in the main animation sequence of a slide.

Syntax

expression .MainSequence

expression A variable that represents a TimeLine object.

Return Value

Sequence

Remarks

The default value of the MainSequence property is an empty Sequence collection. Any attempt to return a value from this property without adding one or more Effect objects to the main animation sequence will result in a run-time error.

Example

The following example adds a boomerang animation to a new shape on a new slide added to the active presentation.

Sub NewSequence()

    Dim sldNew As Slide

    Dim shpnew As Shape



    Set sldNew = ActivePresentation.Slides.Add(Index:=1, Layout:=ppLayoutBlank)

    Set shpnew = sldNew.Shapes.AddShape(Type:=msoShape5pointStar, _

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



    With sldNew.TimeLine.MainSequence.AddEffect(Shape:=shpnew, _

            EffectId:=msoAnimEffectBoomerang)

        .Timing.Speed = 0.5

        .Timing.Accelerate = 0.2

    End With

End Sub

See Also

Concepts

TimeLine Object

TimeLine Object Members