I want to build a C# application that save a pps\ppt file as SWF.
For saving pps\ppt as image I use this code:
Application apps = new Application();
Presentations pps = apps.Presentations;
foreach (string file in Directory.GetFiles("[here is a path]", "*.ppt"))
{
try
{
Presentation p = pps.Open(file, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse);
p.SaveAs("[here is a path]" + p.Name, PpSaveAsFileType.ppSaveAsJPG); //It saves the slides as images in a folder.
Console.WriteLine(id.ToString() + ". " + p.Name);
p.Close();
id++;
}
catch{ }
}
So, how can I save the pps\ppt files from a folder as SWF?
There isn’t this: PpSaveAsFileType.ppSaveAsSWF
No you can’t using PowerPoint API.
To convert PowerPoint files to Flash you have look for software vendors that sell specific API to do that.
Anyway, not all PowerPoint objects/features are supported so you could lose some kind of contents.
Of course it can be done if you develop an application by your self but you need strong knoledge of PowerPoint API and Flash accessing pptx (openxml) files from Flash… it’s a job.