Supercharge your PowerPoint productivity with
Supercharge your PPT Productivity with PPTools - Click here to learn more.

PPTools

Image Export converts PowerPoint slides to high-quality images.

PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements

Merge Excel data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more

Resize your presentations quickly and without distortion

Language Selector switches the text in your presentation from one language to another

FixLinks prevents broken links when you distribute PowerPoint presentations

Shape Styles brings styles to PowerPoint. Apply complex formatting with a single click.

Prep4PDF preserves interactivity in PowerPoint presentations when you convert to PDF

Export linked narration sound files in logically named/numbered order

Problem

If you record narration for a presentation and choose linked sound files, it's easy to get at the sound files that represent the narration, but it can be hard to work out exactly which sound file matches what slide.

When the narration is first recorded, PowerPoint will assign a name like PresentationName.ppt256.wav to the sound for the first slide, PresentationName.ppt257.wav for the second slide and so on. Knowing that it'll number the first slide's sound with 256, you can work out which sound file matches any subsequent slide by adding 255 to the slide number.

That's fine as long as you don't reorder the slides. Once you do that, all bets are off. There's no way to tell what sound file matches a slide without playing the sound file.

Or is there ...?

Solution

Ah. There's a better way. This little macro will copy each slide's narration sound to a new sequentially numbered file.

Sub RenameSoundFiles()
' If you have a presentation with linked narration, this will
' copy the linked sound files to a series of WAV files in the same folder
' as the PPT, with each WAV sequentially numbered to match the slide it
' belongs to, rather than the more confusingly named/numbered sound files
' that PPT itself creates.

    Dim oSld As Slide
    Dim oSh As Shape
    Dim sOutputPath As String

    ' edit this if you like
    sOutputPath = ActivePresentation.Path

    For Each oSld In ActivePresentation.Slides

        For Each oSh In oSld.Shapes
            If oSh.Type = msoMedia Then
                If oSh.MediaType = ppMediaTypeSound Then
                    If oSh.SoundFormat.SourceFullName <> "" Then  ' it's linked
                        FileCopy oSh.SoundFormat.SourceFullName, _
                                                 sOutputPath & "\" & "Slide_" & Format(oSld.SlideIndex,"000") & ".WAV"
                    End If
                End If
            End If
        Next oSh

    Next
End Sub

See How do I use VBA code in PowerPoint? to learn how to use this example code.


Did this solve your problem? If so, please consider supporting the PPT FAQ with a small PayPal donation.
Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2015 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.
Español    Deutsch    Français    Português    Italiano    Nederlands    Greek    Japanese    Korean    Chinese

Supercharge your PPT Productivity with PPTools

content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

Export linked narration sound files in logically named/numbered order
http://www.pptfaq.com/FAQ00949_Export_linked_narration_sound_files_in_logically_named-numbered_order.htm
Last update 07 June, 2011
Created: