I need a way to convert .doc
or .docx
extensions to .txt
without installing anything. I also don\'t want to have to manually open Wor
Note that you can also use OpenOffice to perform miscellaneous document, drawing, spreadhseet etc. conversions on both Windows and *nix platforms.
You can access OpenOffice programmatically (in a way analogous to COM on Windows) via UNO from a variety of languages for which a UNO binding exists, including from Perl via the OpenOffice::UNO module.
On the OpenOffice::UNO page you will also find a sample Perl scriptlet which opens a document, all you then need to do is export it to txt
by using the document.storeToURL()
method -- see a Python example which can be easily adapted to your Perl needs.