PDA

View Full Version : Remove all sounds from animations in powerpoint



paulwilson
08-24-2021, 10:15 PM
I am a secondary school teacher and I been given have 37 different powerpoint files, each with about 50 slides on each. Within each slide, there are animations with sounds. I want to keep the animations, but get rid of the sound effects because they are annoying. So far I just mute the computer speaker, but I would love to find a way to get rid of all the sound effects. Can anyone tell me a macro I could use to do this?

John Wilson
08-25-2021, 04:23 AM
I put a responce on your other post but a new post iS a good idea!

Try this (Test on a copy)



Sub kill_soundeffect()
Dim oeff As Effect
Dim osld As Slide
For Each osld In ActivePresentation.Slides
For Each oeff In osld.TimeLine.MainSequence
oeff.EffectInformation.SoundEffect.Type = ppSoundNone
Next oeff
Next osld
End Sub

paulwilson
08-25-2021, 12:00 PM
that worked brilliantly! thank you very much! That has saved me a huge amount of work and I am sure my students will appreciate the slides without all the wierd "swooshes" and "boings" in every animation.:clap:

paulwilson
08-25-2021, 03:36 PM
In fact, when I checked through the slides, although the macro had removed the sounds, it has also stopped the animation effects working properly, so I have had to go back to the orignal versions. When I ran the macro it seemed to change the type of animation and the sequence of the animations, which meant that some slides did not work properly. Any ideas how I could stop this happening?

paulwilson
08-25-2021, 05:10 PM
When I do it manually, I go to the animation pane, select all the animations, then select "effect options" and choose "no sound". This has no effect on the animations other than removing the sound. But when I ran the macro, it changed lots of other aspects of the animations as well.

John Wilson
08-26-2021, 04:57 AM
I see that too but I have no idea why it should work like that

Maybe something like this


Sub kill_soundeffect()
Dim oeff As Effect
Dim efftype As Long
Dim effdur As Single
Dim effdelay As Single
Dim osld As Slide
For Each osld In ActivePresentation.Slides
For Each oeff In osld.TimeLine.MainSequence
'store animation settings
effdelay = oeff.Timing.TriggerDelayTime
efftype = oeff.EffectType
effdur = oeff.Timing.Duration
oeff.EffectInformation.SoundEffect.Type = ppSoundNone
'reapply settings
oeff.Timing.TriggerDelayTime = effdelay
oeff.EffectType = efftype
oeff.Timing.Duration = effdur
Next oeff
Next osld
End Sub

WORK ON A COPY

paulwilson
08-26-2021, 04:34 PM
thanks vey much, but that macro also changes the animations. Here are before and after images of the animation pane:
BEFORE:28883

AFTER: 28884

John Wilson
08-27-2021, 01:37 AM
Sorry, thats my best shot. Looks like removing the sound in vba resets the animation pane (which is a pain). I even trying replacing the sound with a silent file but it did the same thing.

John Wilson
08-27-2021, 06:55 AM
I don't like giving up!

This approach seems to work. Not sure it would work on very complex animations but it seems to be close. It won't check direction for flyins, wheel spoke numbers etc though.

Basically it checks the animation settings for each animation in turn - deletes it and remakes it with no sound of course.


Sub kill_Sound()
Dim L As Long
Dim osld As Slide
Dim eff_type As Long
Dim b_exit As Boolean
Dim oshp As Shape
Dim eff_Dur As Single
Dim eff_Delay As Single
Dim eff_triggerType As Long
For Each osld In ActivePresentation.Slides
For L = osld.TimeLine.MainSequence.Count To 1 Step -1
With osld.TimeLine.MainSequence(L)
Set oshp = .Shape
eff_Dur = .Timing.Duration
eff_triggerType = .Timing.triggerType
eff_Delay = .Timing.TriggerDelayTime
If .Exit = msoTrue Then b_exit = True
eff_type = .EffectType
.Delete
End With
With osld.TimeLine.MainSequence.AddEffect(oshp, eff_type, , eff_triggerType)
If b_exit Then .Exit = True
.MoveTo L
.Timing.TriggerDelayTime = eff_Delay
.Timing.Duration = eff_Dur
End With
b_exit=False
Next L
Next osld
End Sub

paulwilson
08-28-2021, 12:15 PM
that definitely works much better. It has retained the animations in their correct form. The only problem I can see now is that that it has lost the "paragraph by paragraph" setting for texct boxes, so that now the whole text box appears at once, rather than one line at a time. This a a problem because often I have questions for the students to answer, followed by the solution, and now they can see the whole thing straight away. I really appreciate your help with this!

paulwilson
08-28-2021, 12:21 PM
It also still loses some of the more advanced effects, for example there are "custom paths" with objects following a curved line across the screen for example to animation a ball rolling down a hill. These have disappeared.

John Wilson
08-28-2021, 12:50 PM
Unfortunately it would be close to imposible to check every effect and replace them but at leaste you will be closer.

John Wilson
09-02-2021, 03:01 AM
Not sure what your skill level is but this definitely works if you know how to do it.

Record a 1 second silent wave file and name audio1.wav

Rename the pptx (copy of course) by adding .zip the the suffix ( make sure you have the setting to NOT hide known suffixs)
Open the folder structure of the zip file and look in PPT\Media
You will find an audio file for each sound effect used audio1 / audio2/ audio3 etc replace then with the silent file (rename to audio2 etc as needed. There should only be a few one for each tYPE of effect not each time there is a sound effect

Remove the .zip you added and now no sound will play.