Class Effect (PowerPoint VBA)

The class Effect represents timing information about a slide animation.

The main procedure of class Effect is Delete

Set

To use a Effect class variable it first needs to be instantiated, for example

Dim eff as Effect
Set eff = ActivePresentation.SlideMaster.TimeLine.MainSequence(Index:=1)

The following procedures can be used to set variables of type Effect: Sequence.Item, Sequence.Clone, Sequence.AddEffect, Sequence.AddTriggerEffect, Sequence.ConvertToAfterEffect, Sequence.ConvertToAnimateBackground, Sequence.ConvertToAnimateInReverse, Sequence.ConvertToBuildLevel, Sequence.ConvertToTextUnitEffect, Sequence.FindFirstAnimationFor, Sequence.FindFirstAnimationForClick, Sequences.Item, Sequences.Add and TimeLine.MainSequence

Themes

The following procedures in this class have been grouped together and are described on a separate theme page

Add with its procedures Sequence.AddEffect and Sequence.AddTriggerEffect

Methods

This is the main method of the Effect class

Delete - Deletes the specified Effect object.

ActivePresentation.SlideMaster.TimeLine.MainSequence(1).Delete

Other Methods

Sequence.Clone - Creates a copy of an Effect object, and adds it to the Sequences collection at the specified index position.

Dim effClone As Effect
Set effClone = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence.Clone(Effect:=)

Sequence.ConvertToAfterEffect - Specifies what an effect should do after it is finished. Returns an Effect object that represents an after effect.

Dim effConvertToAfterEffect As Effect
Set effConvertToAfterEffect = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence.ConvertToAfterEffect(Effect:=, After:=msoAnimAfterEffectDim)

Sequence.ConvertToAnimateBackground - Determines whether the background will be animated separately from, or in addition to, its accompanying text. Returns an Effect object representing the newly-modified animation effect.

Dim effConvertToAnimateBackground As Effect
Set effConvertToAnimateBackground = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence.ConvertToAnimateBackground(Effect:=, AnimateBackground:=msoTrue)

Sequence.ConvertToAnimateInReverse - Determines whether text will be animated in reverse order. Returns an Effect object representing the text animation.

Dim effConvertToAnimateInReverse As Effect
Set effConvertToAnimateInReverse = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence.ConvertToAnimateInReverse(Effect:=, animateInReverse:=msoTrue)

Sequence.ConvertToBuildLevel - Changes the build level information for a specified animation effect. Returns an Effect object that represents the build level information.

Dim effConvertToBuildLevel As Effect
Set effConvertToBuildLevel = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence.ConvertToBuildLevel(Effect:=, Level:=msoAnimateChartAllAtOnce)

Sequence.ConvertToTextUnitEffect - Returns an Effect object that represents how text should be animated.

Dim effConvertToTextUnitEffect As Effect
Set effConvertToTextUnitEffect = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence.ConvertToTextUnitEffect(Effect:=, unitEffect:=msoAnimTextUnitEffectByCharacter)

Properties

Behaviors returns a specified slide animation behavior as an AnimationBehaviors collection.

Dim absBehaviors As AnimationBehaviors
Set absBehaviors = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Behaviors

DisplayName returns the name of an animation effect.

Dim strDisplayName As String
strDisplayName = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).DisplayName

EffectInformation returns an EffectInformation object that represents information for a specified animation effect.

Dim einEffectInformation As EffectInformation
Set einEffectInformation = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).EffectInformation

EffectParameters returns an EffectParameters object that represents animation effect properties.

Dim epsEffectParameters As EffectParameters
Set epsEffectParameters = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).EffectParameters

EffectType sets or returns an MsoAnimEffect constant that represents an animation effect type.

ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).EffectType = msoAnimEffect3DArrive

Exit determines whether the animation effect is an exit effect.

ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Exit = msoTrue

Index returns a Long that represents the index number for an animation effect or design.

Dim lngIndex As Long
lngIndex = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Index

Paragraph returns or sets the paragraph in a text range to which to apply animation effects.

ActivePresentation.SlideMaster.TimeLine.MainSequence(1).Paragraph =

Parent returns the parent object for the specified object.

Dim objParent As Object
Set objParent = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Parent

Shape returns a Shape object that represents an animated shape.

Set ActivePresentation.SlideMaster.TimeLine.MainSequence(1).Shape =

TextRangeLength returns or sets a Long that represents the length of a text range.

Dim lngTextRangeLength As Long
lngTextRangeLength = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).TextRangeLength

TextRangeStart returns or sets the start of a text range.

Dim lngTextRangeStart As Long
lngTextRangeStart = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).TextRangeStart

Timing returns a Timing object that represents the timing properties for an animation sequence.

Dim tmnTiming As Timing
Set tmnTiming = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence(1).Timing

Sequence.Count returns the number of objects in the specified collection.

Dim lngCount As Long
lngCount = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence.Count

Sequence.Parent returns the parent object for the specified object.

Dim objParent As Object
Set objParent = ActiveWindow.Selection.SlideRange(1).TimeLine.MainSequence.Parent