Extracting powerpoint audio information

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
 
M

Michael Koerner

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
 
R

roytang

Thanks, but I want to do it programmatically, through VBA. Is the
information not available through the object model?
 
J

John Wilson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top