If you're like me, then you receive .docx, MS Word 2007 files every once in a while. If you're like me, then you dislike emailing back asking the person who sent the .docx file to you to re-send it to you as a .doc or other format. Or, perhaps you're stuck with using a file conversion service such as
zamzar, which sometimes takes a few hours to send you the result during active times of the day.
Fine, so, what can you do about it? . . .
Depends. If you use Windows as your primary operating system, and have an older version of MS Word, such as 2003, then there's a
Microsoft plugin for that.
But, if you use OpenOffice on Windows or Linux, then things are a little trickier. On windows, you've got
some options. On linux, however, you've got Odfconvert.
There's a
good howto available on how to do this. However, I'll paraphrase them into here for simplicity. ;)
This is done on an amd64 Debian Sid installation, FYI. The process for other distros is similar.
First, download either the
x86 or
amd64/x86_64 file.
Yes, yes, I know they're rpm archives. That's not a problem, however . . .
While those are downloading, as root (or using
sudo if you're a Ubuntu user), run
apt-get install rpm libgif4 cpio. Yeah, I know cpio is installed by default. Good practice to include all used utilities. ;)
Wait for the above two to complete. (Note that most of you won't have any problems here. Your internet connections can probably handle a 6MB download in a few moments. Mine, however, can't . . .)
Change to the directory where you downloaded the .rpm to and create a temporary directory . . .
cd ~/downloads
mkdir -p /tmp/odfconvert
cp odf-converter*.rpm /tmp/odfconvert
cd /tmp/odfconvert
Good. Now, extract the archive . . .
rpm2cpio odf-converter* |cpio -ivd
Now (as root or with sudo for you ubuntu people), copy the executable into /usr/bin, where you'll probably want it. If you don't have root access, then simply replace /usr/bin with ~/bin/.
cp usr/lib/ooo-2.0/program/OdfConverter /usr/bin/
If you're like me, you'll need a symlink for libtiff.so.3 . . . (this requires root access or sudo access. If you don't have root access, consider creating a wrapper script that sets LD_LIBRARY_PATH and create a symlink yourself.)
cd /usr/lib
ln -s libtiff.so.4 libtiff.so.3
cd -
Clean up after yourself . . .
cd ..
rm -rf odfconvert
Now, to test it!
cd ~/downloads
OdfConverter /i thedocxfiletoconvert.docx
Wait a moment or two, and . . .
Wait, what's this? A .odt file! It can't be!
It gets better! You can additionally convert .odt *back into .docx*. If you need to do this, just give OdfConverter a .odt file ;)