Extracting powerpoint audio information

  • Thread starter Thread starter roytang
  • Start date Start date
R

roytang

Hi all,

Say I have sounds being played in the timeline of my slide.

Using VBA, I want to:

a. Get the duration of each audio file being played in the timeline

-> Not sure where I can get this. Any idea?

b. Extract the WAV file for each audio file in the timeline.

-> Now, I know I can extract the wav file using
Shape.SoundFormat.Export, but how can I find the corresponding shape
for each effect in the timeline? For sound objects, Effect.Shape
always seems to be "Nothing" when I inspect it in the VBE

Thanks,

Roy
 
Save your presentation as a html file, and it will put all your sound files into the presentation folder. You should be able to get the duration when you play each file.

--
Michael Koerner
MS MVP - PowerPoint


Hi all,

Say I have sounds being played in the timeline of my slide.

Using VBA, I want to:

a. Get the duration of each audio file being played in the timeline

-> Not sure where I can get this. Any idea?

b. Extract the WAV file for each audio file in the timeline.

-> Now, I know I can extract the wav file using
Shape.SoundFormat.Export, but how can I find the corresponding shape
for each effect in the timeline? For sound objects, Effect.Shape
always seems to be "Nothing" when I inspect it in the VBE

Thanks,

Roy
 
Thanks, but I want to do it programmatically, through VBA. Is the
information not available through the object model?
 
Roy, try cycling through all the shapes (oshp) on every slide (osld) (I'm
assuming you know how to do this)

Find sound files using:

If oshp.Type = msoMedia Then
If oshp.MediaType = ppMediaTypeSound Then
'Find duration of the sound (oshp) using:
Set oeff = osld.TimeLine.MainSequence.FindFirstAnimationFor(oshp)
MsgBox oeff.Timing.Duration


--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
 
Back
Top