VBA - getting duration of recorded narration

R

roytang

Hi all,

Is there a way to get the total duration of the recorded narration in
a slide through VBA?

I wish I could just get the slide timings, but the one who recorded
the narration may not have chosen to save the slide timings together
with the narration.

Getting the Effect.Duration from the corresponding effect in the
timeline doesn't help - it returns some low value (0.01ish) that is
obviously not the length of the recorded narration.

Any advice?

Thanks!

Roy
 
S

Steve Rindsberg

Hi all,

Is there a way to get the total duration of the recorded narration in
a slide through VBA?

Not directly. The PowerPoint object model won't tell you anything about it
(makes sense in a weird way ... PowerPoint doesn't actually play the sound; it
turns it over to a Windows component to do the work; it really has no idea
what's going on other than that it IS a sound.)

These pages have lots of info about the MCI player and VB.
I was able to adapt some of the code here to play and record sounds in VB/VBA.
It might be possible to eg. load a sound, seek to the end and query the length.

http://www.geocities.com/smigman.geo/mci/home.html
http://www.geocities.com/smigman.geo/mci/riffmci.html
 

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