Processing
 

Save PPS/PPT files as SWF using C#

13/06/2012 12:22#1

anon

Member

Joined at: 10 months ago

Post: 75

Thank: 0

Thanked: 0

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

13/07/2012 17:57Top#2

Joined at: 10 months ago

Post: 7

Thank: 0

Thanked: 0

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.

21/05/2016 16:02Top#3

MarkV

Member

Joined at: 6 months ago

Post: 1

Thank: 0

Thanked: 0

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 http://print2flash.com/download.php

Similar articles

Open a folder in finder/explorer from a webpage?

5 years ago - Reply: 2 - Views: 80

How do I escape a reserved word in Actionscript?

5 years ago - Reply: 2 - Views: 198

Save PPS/PPT files as SWF using C#

5 years ago - Reply: 2 - Views: 171

Ways of making a graphic/visual novel in flash

6 years ago - Reply: 3 - Views: 114

Use PhoneGap + HTML5 and an Embedded Flash Movie

5 years ago - Reply: 2 - Views: 96

View word docs and PDF in browser?

5 years ago - Reply: 2 - Views: 52

ActionScript 3 Read JPEG quality

7 years ago - Reply: 2 - Views: 59

Export/Test Movie Issues

5 years ago - Reply: 3 - Views: 39

Flash always on top in Android browser workaround?

5 years ago - Reply: 2 - Views: 149

Sending Json Form from Flash AS3

5 years ago - Reply: 2 - Views: 29

parsing a swf/fla (using php?)

6 years ago - Reply: 2 - Views: 44

Getting high FPS on Flash/AIR games for mobile?

4 years ago - Reply: 2 - Views: 58

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re