Slides and Audio

Sep 03, 2015

I feel like my workflow is pretty standard, so I'm wondering if there's someone out there that knows some magic that can make my life easier...

I routinely receive a PowerPoint slide deck and a host of wav or mp3 files.  They are (usually) labeled 1 - whatever number and correspond to the slides.  I find myself having to insert each audio file separately.  It's time consuming and annoying.

Any solutions?  It would be awesome if there was a button I could push that would look in whatever directory I link it to and try and match the appropriate audio file with the appropriate slide.

2 Replies
Nick Kotula

After some thinking on it, I wrote up some code to do it for me in PowerPoint.  I'm posting it here if anyone wants to use it.  Anything that would have to be changed I've labeled as such.  Enjoy!

Option Explicit

Sub link_audio()

 

Dim oSl As Slide

Dim oSh As Shape

Dim x As Integer

Dim sound_file As String

 

x = 1

For Each oSl In ActivePresentation.Slides

    sound_file = "Your Directory and File Name" & x & ".wav"

    Set oSh = oSl.Shapes.AddMediaObject(sound_file, 10, 10, -1, -1)

    With oSh.AnimationSettings.PlaySettings

        .PlayOnEntry = True

        .PauseAnimation = False

        .StopAfterSlides = 19

    End With

    x = x + 1

 

Next oSl

 

 

End Sub

This discussion is closed. You can start a new discussion or contact Articulate Support.