traveler has asked for the wisdom of the Perl Monks concerning the following question:

I have searched Super Search, CPAN and google looking for a tool to manipulate Powerpoint files. Sepecifically I'm looking to index a presentation, and maybe manage changes. I know there's Win32::OLE, but I don't have any experience with programming OLE and I really can't take the time to figure out how to make Powerpoint do what I want. If anyone out there has any info or a nice example of a Powerpoint indexing program in perl, I'd sure appreciate it.

Thanks! --traveler

Replies are listed 'Best First'.
Re: Manipulate Powerpoint Docs?
by rchiav (Deacon) on Jul 25, 2001 at 20:41 UTC
    Unfortunately, you're going to have to use Win32::OLE if you want to programatically manipulate Powerpoint documents. This is regardless of the language you're using. (OLE in general.. not that module specifically)

    If you're going to take the time to figure out how Win32::OLE works (which isn't that much time), you're then going to need the Powerpont Object Model. This will give you all of the methods and properties that are available through OLE.

    Hope this helps..
    Rich

Re: Manipulate Powerpoint Docs?
by HyperZonk (Friar) on Jul 25, 2001 at 20:29 UTC
    I hate to give an anti-answer answer, but I'm afraid you're not going to have much luck. The PPT file format is one of M$'s most jealously guarded "trade secrets" right up there with the PUB format. It is difficult, if not impossible, to find anything other than M$ products that read either format (even their other programs usually won't open them). Also, considering M$'s current attitude towards Perl, I doubt that they would even consider licensing the file formats for use in creating a Perl interface.

    Sorry that I couldn't be more helpful.

    -HZ
Re: Manipulate Powerpoint Docs?
by MZSanford (Curate) on Jul 25, 2001 at 20:30 UTC
    Alas, my only thought would be Win32::OLE, and have never found any other modules for power point manipulation. The only Microsoft Office™ software (with the exception of Access™) that i have seen interfaced without OLE is Excel™ via Spreadsheet::ParseExcel. I do wonder, has anyone seen any non-OLE support for Powerpoint™ or Word™ documents ?

    wouldn't be Microsoft™ without the ™
    Thus spake the Master Programmer:
    "When you have learned to snatch the error code from the trap frame, it will be time for you to leave."
    -- The Tao of Programming
      I do wonder, has anyone seen any non-OLE support for Powerpoint™ or Word™ documents ?

      My favorite support program for Word™ documents is 'strings'. :-)

      Works really nice as a filter from Pine...

      ___ -DA > perl -MPOSIX -le '$ENV{TZ}="EST";print ctime(1000000000)' Sat Sep 8 20:46:40 2001
Re: Manipulate Powerpoint Docs?
by jmcnamara (Monsignor) on Jul 25, 2001 at 20:52 UTC

    Win32::OLE is probably the best way to tackle this problem.

    However, there is a C based PPT to HTML converter that is bundled with the Excel to HTML converter xlHtml. From the Readme: The pptHtml program will take a PowerPoint 97/95 file as input and convert it to html.

    I haven't tried the PPT converter but the Excel converter is very good.

    John.
    --

      Thank you! I will build this code soon. Unfortunately there is no win32 binary for the PPT to HTML converter, so I'll have to build it (on Linux) to test it.

      I could use Win32::OLE, but as mentioned above, I'd have to figure out the object model as rchiav mentioned. I was hoping not to have to undertake that task. Maybe there is enough in xlHtml that I can hack that.

      --traveler