DocX Creation

Hello everyone,

does anyone of you have successful experiences to create platform independent DocX-Files for Word with Xojo without the Xojo OLE-Control (so you can open on OS X, Windows and Linux)? Maybe with TTsZipPackage or ZipMBS?


Shouldn’t be too difficult. The documentation is just a couple of thousand pages. It’s xml and then zipped.

Sorry, couldn’t resist :slight_smile:


the difficult thing is the Zip-Compression. It’s called Base64. At the moment we don’t know if the whole Zip is compressed or only some Files within…

Another idea… perhaps RTF is a way to go. XOJO has simple built in options. For more features (Pictures, Hyperlinks) Formatted Text Control by Bkeeney Software can be used.

Perhaps there is a command line converter or web service available to convert to DOCX

I know Björn, but RTF ist very old.

The Formatted Text Control isn’t so good for me. I wan’t a plattform independent solution without command line services.

Ask by myself, why there is no existing Xojo-DocX-Library like those ones for PHP:

Nope there isn’t
The best docx write I found is written in C#
Its a huge pile of code

FWIW MS updates RTF reasonably regularly and it can handle a lot of stuff

It really depends on what you want to do. If you absolutely need docx then find a library that does what you want. For everything else rtf is way easier.

I know some one else looking for such a thing and it literally doesn’t exist
If there were a C / C++ library for this Christian would probably already have it wrapped in a plugin

On Windows, you will not find better than the OLE.

On Mac, the best solution is to use TextUtils which produces a very clean Docx and converts from it . See

For Linux, this may help :

In sum, it is doubtful you can find a unique solution for all three platforms, but with the appropriate conditional compilation/execution, you may have the same feature on all of them.

At least on Windows and Mac, this is a sure thing.

Personally, I would use RTF on Linux. There, Docx is really not usual.

On Mac, Docx usage is debatable. The standard with TextEdit is RTF, but Pages is able to open Docx and convert it to the Pages format. It is however a bit cumbersome. And many users do not have Word installed.

Windows is probably the only platform where Docx is common. HOWEVER, there are a lot a machines still using Office 2007 which decidedly cannot open Docx. Not to mention Windows machines where Office is not installed.

Even if you are sure you want your software to generate docx documents, you should IMHO offer users the possibility to generate RTF, which can be opened much more readily by any machine, without requiring Office or Open Office.