How to open Microsoft OpenXML docx documents in OpenOffice

As of this time of this writing, the OpenOffice.org package included with Ubuntu Festy Fawn, Ubuntu Gutsy Gibbon and Debian Etch still does not support opening Microsoft Office OpenXML (docx) document format.

Though the use of docx files are HIGHLY DISCOURAGED, it is still important for us to be able to read document in this format in-case if somebody forwarded docx files to us.

Here are some easy steps to follow in order to enable OpenOffice.org to read OpenXML docx files :

  • Download odf_filter.tar.bz2 file, and unzip it
  • The archive contains 4 additional files, MOOXFilter_cpp.xcu, MOOXTypeDetection.xcu, OdfConverter and README.txt
  • Follow instructions in README.txt and copy the 3 files into Openoffice installation directory as outlined below


sudo cp OdfConverter /usr/lib/openoffice/program/

sudo cp MOOXFilter_cpp.xcu

  • usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Filter/

    sudo cp MOOXTypeDetection.xcu /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Types/

  • openoffice_docx.png

    After that, your Openoffice.org installation should be able to read/open Microsoft Office 2007 OpenXML docx file without any problems.

    Drawbacks
    This trick only works on Document (docx) files but not on Presentation (pptx) and Spreadsheet files (xslx).

    Original source – OpenOffice. OpenXML Translator

    [tags]docx,openxml,openoffice,feisty,feisty fawn,gutsy,gutsy gibbon,openoffice.org,microsoft,office,microsoft office[/tags]

    21 thoughts on “How to open Microsoft OpenXML docx documents in OpenOffice

    1. The second line, path is missing the leading /.

      sudo cp MOOXFilter_cpp.xcu usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Filter/

      should be

      sudo cp MOOXFilter_cpp.xcu /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Filter/

    2. Thanks so much. An instructor just uploaded a half-page of instructions in this god-forsaken format and I am soooo happy I can open it without purchasing MS Word 2007. If only MS could be forced to use ODF like everyone else.

    3. I simply send .docx files back to the sender, and ask them to send it in a standard format, even the older Microsoft Word formats. And I include a link to OpenOffice.org, so they can get a free word processor that will allow them to do so. Why should the rest of the world suffer just because MS wants to make a few more bucks and not allow their old format to be used?

    4. Well that was a bit of a flop. I tried importing a file as type docx and got the message that the file was corrupt, and would OO like me to repair it. I said yes but the resulting file was empty. Bit of a pity. I will go and try the command line programme next when there is some time …

      Thanks anyway.

      Incidentally, I entirely agree with Karens’ suggestion, above.

    5. Here is a simple script I wrote to do everything in one step. Call the script ooxmlfilterinstall.sh and run it like so

      sudo ooxmlfilterinstall.sh

      or to remove the converter:

      sudo ooxmlfilterinstall.sh uninstall

      —-
      #!/bin/sh
      # installer for OpenOffice OOXML filter/converter.
      PKGURL=”http://blog.mypapit.net/imej/odf_filter.tar.bz2″
      PKGFILE=”odf_filter.tar.bz2″
      FILE1=”./files/MOOXFilter_cpp.xcu”
      FILE1DEST=”/usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Filter/MOOXFilter_cpp.xcu”
      FILE2=”./files/MOOXTypeDetection.xcu”
      FILE2DEST=”/usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Types/MOOXTypeDetection.xcu”
      FILE3=”./files/OdfConverter”
      FILE3DEST=”/usr/lib/openoffice/program/OdfConverter”
      if test “$1″ = ‘uninstall’;then
      echo “$0: Uninstalling OpenOffice OOXML Converter.”
      rm -f $FILE1DEST $FILE2DEST $FILE3DEST
      else
      echo “$0: Installing OpenOffice OOXML Converter.”
      echo “$0: downloading odf_filter.tar.bz2″
      wget $PKGURL > /dev/null 2>&1
      echo “$0: extracting odf_filter.tar.bz2″
      tar -xjf $PKGFILE
      echo “$0: Installing files”
      # don’t clobber
      cp -u $FILE1 $FILE1DEST
      cp -u $FILE2 $FILE2DEST
      cp -u $FILE3 $FILE3DEST
      fi
      echo “$0: Done.”
      —-

    6. Where is fine tool-repair docx file, is a program to fix doc files, can repair docx file of Microsoft Office 2007, repair word files through network, can solve next errors: Word unable to read file, .doc file is not in the recognizable format, Word 2007 unable to read file docx, Word cannot access read-only document, cannot read word file because corrupted, Microsoft word this file is not in a recognizable format.

    7. Presumably, with OOo V3.0 about to hit the streets, everyone should be testing, feeding-back and improving OOo?

      But, I´m still with Karen …

    8. Here’s a much better script to deal with the problem once and for all.

      find /home -iname ‘*.docx’ -print | awk ‘{print “rm ” $1}’ | sh

      :)

    9. I had the same problem as David. Any feedback on this problem?

      David Legg Said:
      February 1st, 2008 at 6:13 am

      Well that was a bit of a flop. I tried importing a file as type docx and got the message that the file was corrupt, and would OO like me to repair it. I said yes but the resulting file was empty. Bit of a pity. I will go and try the command line programme next when there is some time …

      Thanks anyway.

      Incidentally, I entirely agree with Karens’ suggestion, above

    10. Worked great! Thanks for posting it here. I tried through Novell’s site first and it was a pain to find and then ended up being in rpm format. (The machines I’m administering run Debian Etch.)

    11. Wow, thanks so much for posting that! It works great for the things I use it on (make sure to include the extra / as mentioned above) which are not very complex. My machine has 256mb of RAM (!), and it does it pretty quick.

      Thanks a billion!

    12. Using the OpenOffice.org plugin caused it to crash, repeatedly, until I deleted the .xcu files. However, the OdfConverter program works fine stand-alone and I was able to read the .docx files using it and then opening the resultant .odf in OpenOffice.org manually.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>