So you wanna convert Open Office Documents to Wiki format?

While working on some Model-Glue documentation we needed to convert an open office document to TracWiki format. I'm not fluent in TracWiki and I certainly didn't want to manually format 30-40 pages. Thankfully, there is an Open Office --> TracWiki conversion macro that will automate pretty much all of it. It helps if you used the Styles features of Open Office because the TracWiki will be cleaner, but no worries, it'll convert it anyways if you didn't. Here is how it works.

  1. Open the Open Office document you want to copy text from. We'll call it the Source document.
  2. Set the macro permissions to Medium or Low by going to the menu -> Tools -> Options -> Open Office.org -> Security -> Macro Security
  3. Download and open the Open Office Template Macro (ODT file)
  4. Remove all text in the newly opened ODT file.
  5. Highlight the text in your Source document, copy it, then paste it into the ODT file.
  6. Press the button with the correct format, the text will be converted to the correct wiki format and copied to the clipboard. (English is on page 2)
  7. Paste the text from the clipboard into the edit box in your wiki.

You now have converted Open Office document text to wiki format.

The conversion picked nearly everything. I manually cleaned up white space issues and also added in code blocks around all the source code sections, but I was very pleased with the amount of work handled by the OpenOfficeToTracWikiScript.

There are no comments for this entry.

Add Comment Subscribe to Comments

3/10/10 11:56 PM # Posted By gavin

I'm running OO 3.1.1. on Ubuntu and I'm getting a Runtime error. Line 678 of mcopywikiki out of scope?