in reply to Re: Opening word file in open office
in thread Opening word file in open office

Hi,

If the OpenOffice::OODoc will not read the word files means, any other source to read the word file. Now we are moving to open source.

Replies are listed 'Best First'.
Re^3: Opening word file in open office
by Corion (Patriarch) on Jun 27, 2009 at 14:22 UTC
Re^3: Opening word file in open office
by marto (Cardinal) on Jun 27, 2009 at 14:38 UTC
      Yes martin i posted the question but no reply.
      Hi The example at OpenOffice::UNO which u mentioned is compleatly useless. I understood nothing. What I would need is a real example which uses OpenOffice::UNO to open a Word-document and saves it as odt-document. If anyone could post such code this would be really cool!! Alex
Re^3: Opening word file in open office
by afoken (Chancellor) on Jun 27, 2009 at 20:46 UTC

    There still is no Perl module written to read the various MS Word formats on CPAN, but OLE::Storage has an example script that extracts text from MS Word 6/7/8 files, so OLE::Storage should be able to read MS Word files, but maybe not on that high level that OpenOffice::OODoc offers. The newer OLE::Storage_Lite should also be able to read MS Word files. There is also a module that can WRITE MS Word files (Win32::Word::Writer), but it depends on OLE and an installed MS Word. Newer MS Office versions (starting at Office 2003) write ZIP-compressed XML files for at least Word, Excel, and Powerpoint. You just have to unzip the *.docx file and parse the XML file it contains, very similar to what OpenOffice::OODoc does. See also Re: Excel 2007 Support.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)