Skip to content

Latest commit

 

History

History
70 lines (42 loc) · 2.15 KB

PowerPoint.Sequence.AddEffect.md

File metadata and controls

70 lines (42 loc) · 2.15 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Sequence.AddEffect method (PowerPoint)
vbapp10.chm651004
vbapp10.chm651004
PowerPoint.Sequence.AddEffect
fea5ac1e-83ae-2241-bf3a-8cfdd8354791
06/08/2017
medium

Sequence.AddEffect method (PowerPoint)

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

Syntax

expression. AddEffect( _Shape_, _effectId_, _Level_, _trigger_, _Index_ )

expression A variable that represents a Sequence object.

Parameters

Name Required/Optional Data type Description
Shape Required Shape The shape to which the animation effect is added.
effectId Required MsoAnimEffect The animation effect to be applied.
Level Optional MsoAnimateByLevel For charts, diagrams, or text, the level to which the animation effect will be applied. The default value is msoAnimationLevelNone.
trigger Optional MsoAnimTriggerType The action that triggers the animation effect. The default value is msoAnimTriggerOnPageClick.
Index Optional Long The 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

Effect

Example

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

[!includeSupport and feedback]