Programmatically saving embedded audio

G

Guest

Hey all,

I'm trying to programmatically save embedded audio from a powerpoint
presentation onto an arbitrary location on the file system.

I'm new to programming office/ppt plug-ins so I thought i'd ask before I
spin my wheels too much. Basically what I am doing is writing an Export tool
thats converts a ppt file into a series of images and audio files if they
exist.

using PowerPoint = Microsoft.Office.Interop.PowerPoint;
using Office = Microsoft.Office.Core;
....
PowerPoint.Shape tmp = Application.ActivePresentation.SlidesIdea.Shapes[j];
if (tmp.Type == Office.MsoShapeType.msoMedia)
{
if (tmp.MediaType == PowerPoint.PpMediaType.ppMediaTypeSound)
{
//Determine embedded vs linked
//embedded if Shape.LinkedFormat.SourceFileName throws COMException
}
}

I don't have a problem saving linked audio because I have the absolute path
of the audio file.

The problem I am having is saving embedded wav files. I don't understand how
the Shape Object (Powerpoint object model?) stores Embedded Media.
 

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