# DocX Creation

**URL:** <https://forum.xojo.com/t/docx-creation/26591>\
**Category:** Getting Started\
**Created:** [September 11, 2015, 5:00pm UTC](https://forum.xojo.com/t/docx-creation/26591 "2015-09-11T17:00:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_T](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@Martin\_T](https://forum.xojo.com/u/Martin_T)\
**Post date:** [September 11, 2015, 5:00pm UTC](https://forum.xojo.com/t/docx-creation/26591/1 "2015-09-11T17:00:16Z")

</div>

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?

Greetings

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [September 11, 2015, 5:09pm UTC](https://forum.xojo.com/t/docx-creation/26591/2 "2015-09-11T17:09:55Z")

</div>

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

Sorry, couldn’t resist 🙂

---

<div class="post-metadata">

**Author:** ![Martin\_T](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@Martin\_T](https://forum.xojo.com/u/Martin_T)\
**Post date:** [September 11, 2015, 5:18pm UTC](https://forum.xojo.com/t/docx-creation/26591/3 "2015-09-11T17:18:44Z")

</div>

Haha,

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…

---

<div class="post-metadata">

**Author:** ![Bjorn\_Dohle](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/50afbb/32.png) [@Bjorn\_Dohle](https://forum.xojo.com/u/Bjorn_Dohle)\
**Post date:** [September 11, 2015, 5:19pm UTC](https://forum.xojo.com/t/docx-creation/26591/4 "2015-09-11T17:19:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Martin\_T](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@Martin\_T](https://forum.xojo.com/u/Martin_T)\
**Post date:** [September 11, 2015, 5:30pm UTC](https://forum.xojo.com/t/docx-creation/26591/5 "2015-09-11T17:30:01Z")

</div>

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:

- [https://github.com/PHPOffice/PHPWord](https://github.com/PHPOffice/PHPWord)
- [https://github.com/nagilum/DOCx](https://github.com/nagilum/DOCx)
- [http://www.phpdocx.com](http://www.phpdocx.com)

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [September 11, 2015, 5:37pm UTC](https://forum.xojo.com/t/docx-creation/26591/6 "2015-09-11T17:37:52Z")

</div>

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  
[http://www.microsoft.com/en-us/download/details.aspx?id=10725](http://www.microsoft.com/en-us/download/details.aspx?id=10725)

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [September 11, 2015, 5:59pm UTC](https://forum.xojo.com/t/docx-creation/26591/7 "2015-09-11T17:59:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [September 11, 2015, 6:03pm UTC](https://forum.xojo.com/t/docx-creation/26591/8 "2015-09-11T18:03:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [September 11, 2015, 11:33pm UTC](https://forum.xojo.com/t/docx-creation/26591/9 "2015-09-11T23:33:06Z")

</div>

> [@212904:@Martin Trippensee](#):
>
> 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?

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 [https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/textutil.1.html](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/textutil.1.html)

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [September 12, 2015, 3:23am UTC](https://forum.xojo.com/t/docx-creation/26591/10 "2015-09-12T03:23:32Z")

</div>

For Linux, this may help : [http://www.oooninja.com/2008/02/office-compatibility-pack-review.html](http://www.oooninja.com/2008/02/office-compatibility-pack-review.html)  
and/or [http://www.oooninja.com/2008/01/convert-openxml-docx-etc-in-linux-using.html](http://www.oooninja.com/2008/01/convert-openxml-docx-etc-in-linux-using.html)

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.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:56pm UTC](https://forum.xojo.com/t/docx-creation/26591/11 "2020-10-29T17:56:50Z")

</div>


