http://www.perlmonks.org?node_id=31406


in reply to PowerPoint, Linux/Win32

Not quite sure whether you just want to extract the text from PPT, or whether you want to make changes to it and save it back as a valid PPT. If it's the latter option, I think you're onto a loser! Assuming the former, can you get the users to save in "Outline/RTF" format ? This will give you just the text, in RTF, which is fairly easy to parse. If you have to deal with a PPT file, you might be able to write something using libole2 to open the PPT file and parse it directly, but it will not be easy! (First challenge - find the documentation for the PPT file format on msdn.microsoft.com) Alternatively you could use something like StarOffice to convert it, but this will be very slow if you're processing lots of big presentations. A final thought - putting religion to one side for a moment, why are you using Linux? For the cost of a PC, a Win2K licence and a Powerpoint licence (i.e. a few thousand pounds), you could save yourself lots of coding by just using Perl with Win32::OLE and controlling powerpoint directly. Your solution would be less likely to break when someone uses a powerpoint feature that StarOffice doesn't understand, too. Chris