TimeLine.MainSequence Property
Returns a Sequence object that represents the collection of ColorEffect objects in the main animation sequence of a slide.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
ReadOnly Property MainSequence As Sequence
Get
'Usage
Dim instance As TimeLine
Dim value As Sequence
value = instance.MainSequence
Sequence MainSequence { get; }
Property Value
Type: Microsoft.Office.Interop.PowerPoint.Sequence
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.
Examples
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