Class SoundEffect (PowerPoint VBA)

The class SoundEffect represents the sound effect that accompanies an animation or slide transition in a slide show.


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

Dim set as SoundEffect
Set set = ActiveWindow.RangeFromPoint.AnimationSettings.SoundEffect

The following procedures can be used to set variables of type SoundEffect: ActionSetting.SoundEffect, AnimationSettings.SoundEffect, EffectInformation.SoundEffect and SlideShowTransition.SoundEffect


Specifies the sound that will be played whenever the specified shape is clicked or animated or whenever the specified slide transition occurs.

Syntax : expression.ImportFromFile (FileName)


Returns or sets the name of the specified object.

You can use the object's name in conjunction with the Item method to return a reference to the object if the Item method for the collection that contains the object takes a Variant argument. For example, if the value of the Name property for a shape is Rectangle 2, .Shapes("Rectangle 2") returns a reference to that shape.

ActiveWindow.RangeFromPoint.AnimationSettings.SoundEffect.Name =


Returns the parent object for the specified object.


Plays the specified sound effect.



Represents the type of sound effect.

Possible Values are ppSoundEffectsMixed - Mixed, ppSoundFile - File, ppSoundNone - None, ppSoundStopPrevious - Stop Previous.

The value of the Type property can be one of these PpSoundEffectType constants.

ActiveWindow.RangeFromPoint.AnimationSettings.SoundEffect.Type = ppSoundEffectsMixed