Table of contents
Collapse the table of content
Expand the table of content

Sequence.AddEffect Method (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Returns an Effect object that represents a new animation effect added to a sequence of animation effects.


expression. AddEffect( Shape, effectId, Level, trigger, Index )

expression A variable that represents a Sequence object.


NameRequired/OptionalData TypeDescription
ShapeRequiredShapeThe shape to which the animation effect is added.
effectIdRequiredMsoAnimEffectThe animation effect to be applied.
LevelOptionalMsoAnimateByLevelFor charts, diagrams, or text, the level to which the animation effect will be applied. The default value is msoAnimationLevelNone.
triggerOptionalMsoAnimTriggerTypeThe action that triggers the animation effect. The default value is msoAnimTriggerOnPageClick.
IndexOptionalLongThe position at which the effect will be placed in the collection of animation effects. The default value is -1 (added to the end).

Return Value



The following example adds a bouncing animation to the first shape range on the first slide. This example assumes a shape range containing one or more shapes is selected on the first slide.

Sub AddBouncingAnimation()

    Dim sldActive As Slide
    Dim shpSelected As Shape

    Set sldActive = ActiveWindow.Selection.SlideRange(1)
    Set shpSelected = ActiveWindow.Selection.ShapeRange(1)

    ' Add a bouncing animation.
    sldActive.TimeLine.MainSequence.AddEffect _
        Shape:=shpSelected, effectId:=msoAnimEffectBounce

End Sub

See also


Sequence Object

© 2018 Microsoft