I'm creating an interactive escparoom in powerpoint using some simple macros. I've uploaded a .wav file to slide 1 and set it to play through all slides.
I want to be able to alt+tab in and out of the presentation, which works fine while in the original pp file.
My issue is that I need to create a powerpoint slide show (.ppsm) . When opening the .ppsm the sound works fine untill i tab out and in. This issue does not happen if i tab out and in on slide one (where the media file is placed).
By coincidense i discovered that this could be fixed by uploading my .wav through a macro:
-------------------------------------------------------
Dim oSlide As Slide
Dim oShp As Shape
Dim oEffect As Effect
Set oSlide = ActivePresentation.Slides(3)
Set oShp = oSlide.Shapes.AddMediaObject2("8bit.wav", True, False, 50, 50)
Set oEffect = oSlide.TimeLine.MainSequence.AddEffect(oShp, msoAnimEffectMediaPlay, , trigger:=msoAnimTriggerWithPrevious)
With oShp.AnimationSettings.PlaySettings
.PlayOnEntry = True
.PauseAnimation = False
.StopAfterSlides =
End With
End Sub
---------------------------------------------------------
However, now the issue is the opposite... The music wont stop playing, even when tabbed out of presentation. I could work with this, but then i would need a way to pause or mute the mediaplay. I just can't find a way to do so.
I've tried stuff like:
.MediaFormat.Muted = True
and
.Animationsettings.Playsettings.PauseAnimation=True
and
ActivePresentation.SlideShowWindow.View.State = ppSlideShowPaused
I can't get any of these to work. The strange thing is, when using ".Muted" the media-icon on slide 1 actually indicates volume = 0. But the music is still playing, nonetheless. When I pause powerpoint, using the latter of the codes, all animations freeze - except that the music keeps playing.
So:
Is there a way to fix dissappearing sound when using mediafiles in .ppsm files.?
or:
Is there a way to mute/pause mediafiles, after importing it with a macro?
All help is much appreciated!
Best regards Bjarke
Edit Mod : cross posted at https://answers.microsoft.com/da-dk/...3665403&auth=1 - Information supplied by the OP
Bookmarks