Add related procedures in class Effect (PowerPoint VBA)

This page presents procedures from class Effect related to the theme Add: Sequence.AddEffect and Sequence.AddTriggerEffect

Sequence.AddEffect

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)

Dim effAddEffect As Effect
Set effAddEffect = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence.AddEffect(Shape:=, effectId:=msoAnimEffect3DArrive)

Arguments

The following arguments are required:

Shape (Shape) - The shape to which the animation effect is added.

effectId (MsoAnimEffect) - The animation effect to be applied.

Here you can find possible values for MsoAnimEffect.

The following arguments are optional

Level (MsoAnimateByLevel) - For charts, diagrams, or text, the level to which the animation effect will be applied. The default value is msoAnimationLevelNone.

Here you can find possible values for MsoAnimateByLevel.

trigger (MsoAnimTriggerType) - The action that triggers the animation effect. The default value is msoAnimTriggerOnPageClick.

Possible Values are

msoAnimTriggerAfterPrevious After the Previous button is clicked.
msoAnimTriggerMixed Mixed actions.
msoAnimTriggerNone No action associated as the trigger.
msoAnimTriggerOnMediaBookmark
msoAnimTriggerOnPageClick When a page is clicked.
msoAnimTriggerOnShapeClick When a shape is clicked.
msoAnimTriggerWithPrevious When the Previous button is clicked.

Index (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).

Sequence.AddTriggerEffect

Adds a trigger effect to the animation in a Sequence object.

Syntax : expression.AddTriggerEffect (pShape, effectId, trigger, pTriggerShape, bookmark, Level)

Dim effAddTriggerEffect As Effect
Set effAddTriggerEffect = ActivePresentation.SlideMaster.TimeLine.MainSequence.AddTriggerEffect(pShape:=, effectId:=msoAnimEffect3DArrive, trigger:=msoAnimTriggerAfterPrevious, pTriggerShape:=)

Arguments

The following arguments are required:

pShape (Shape) - The Shape object with animation.

effectId (MsoAnimEffect) - The type of animation.

Here you can find possible values for MsoAnimEffect.

trigger (MsoAnimTriggerType) - The type of trigger effect to add.

Possible Values are

msoAnimTriggerAfterPrevious After the Previous button is clicked.
msoAnimTriggerMixed Mixed actions.
msoAnimTriggerNone No action associated as the trigger.
msoAnimTriggerOnMediaBookmark
msoAnimTriggerOnPageClick When a page is clicked.
msoAnimTriggerOnShapeClick When a shape is clicked.
msoAnimTriggerWithPrevious When the Previous button is clicked.

pTriggerShape (Shape) - The Shape object that represents the trigger.

The following arguments are optional

bookmark (String) - The bookmark.

Level (MsoAnimateByLevel) - The level of animation.

Here you can find possible values for MsoAnimateByLevel.