SoundEffect Property

Microsoft PowerPoint Visual Basic

object: Returns a SoundEffect object that represents the sound to be played when the specified shape is clicked or the mouse pointer passes over the shape. If you don't hear the sound that you assigned to the shape when you run the slide show, make sure that the TextLevelEffect property is set to a value other than ppAnimateLevelNone and that the Animate property is set to True.

AnimationSettings and EffectInformation objects: Returns a SoundEffect object that represents the sound to be played during the animation of the specified shape.

SlideShowTransition object: Returns a SoundEffect object that represents the sound to be played during the transition to the specified slide.

expression.SoundEffect

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example sets the file Bass.wav to be played whenever shape one on slide one in the active presentation is animated.

With ActivePresentation.Slides(1).Shapes(1).AnimationSettings
    .Animate = True
    .TextLevelEffect = ppAnimateByAllLevels
    .SoundEffect.ImportFromFile "c:\bass.wav"
End With