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

Hi wise monks! I'm wondering if someone used OpenOffice Typelib with Win32::OLE instead of Microsoft Office Typelib?
I don't need full office automation, i just need to add an OLE property to word document
I've already read OLE file format spec, and felt in despair =)
Then i've just explored OLE structured document with hex editor, and it looked much more simple than in M$ spec. But still failed to work for me, so i decided to just give it up, and use some perl package for that purpose.
But failed again because of Typelib constants.
PS:Maybe there is some other package to use, or way to use OO typelib with Win32::OLE?

Replies are listed 'Best First'.
Re: OpenOffice Typelib And Win32::OLE
by Corion (Patriarch) on Jan 26, 2011 at 22:38 UTC

    As far as I'm aware, OpenOffice has very little in the way of an OLE interface. It has the UNO interface, which is a thin layer above the horribly botched Java API. I gave a talk on using VB with MS Office, and at the end, I briefly touch how OO could be automated. There is no Perl-friendly wrapper I'm aware of. You can create OOo documents directly, as they are mostly zipped XML files.

      Thanks for answering!
      OpenOffice is capable of saving documents in Word 2000 compatible format, therefore it must be capable of working with OLE format.
      All i need is ability to create OLE property in MS Word document, not OpenOffice automation.

        There only is a module for working natively with Excel OLE files, Spreadsheet::ParseExcel and Spreadsheet::WriteExcel. There is no such module for working with MS Word files. So if you don't have MS Word installed, you will need to write the appropriate Perl code to manipulate a MS Word file.

Re: OpenOffice Typelib And Win32::OLE
by Anonymous Monk on Jan 27, 2011 at 11:58 UTC