Save PPS/PPT files as SWF using C#

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"))
          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);
          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.

You need to convert PPT files with some third-party software that has a C# API. I use print2flash for this purpose. The core conversion code I use is quite simple if I omit some options from my real C# application

Print2Flash4.Server2 serv = new Print2Flash4.Server2();
Print2Flash4.Profile2 prof = new Print2Flash4.Profile2();
prof.DocumentType = Print2Flash4.DOCUMENT_TYPE.FLASH;
serv.ConvertFile(inputfile, swf_file, prof, null, null);

To use this code, you need to get Interop.Print2Flash4.dll as well. You may get the dll and further instructions from the sdk available for download from

Need Your Help

C Programming (Beginner help) relating to getchar() putchar()

c while-loop getchar putchar

Im new to C programming and wanted to clear, what may seem to be, a silly doubt...