> For the complete documentation index, see [llms.txt](https://xojo.gitbook.io/add-ons/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xojo.gitbook.io/add-ons/ftc-word-exporter.md).

# FTC Word-Exporter

**Current Version:** 1.0.0 (08. May 2018)

![](/files/-LMNk2NDAfwwMGoCS6wX)

The class is a subclass of **FTIteratorBase**. This is available in all versions of FTC greater than or equal to version 3.0. Users of older FTC versions should use the demo class with version 2.4.1 to see if their **FTIteratorBase** is already compatible with the class. I developed the class for FTC versions >= 3.

You can download the latest version of the **Formatted Text Control 3.2.1** here:

{% embed url="<https://github.com/atomiccity/FormattedTextControl>" %}

You need a valid license for the [MBS-Compression](http://www.monkeybreadsoftware.de/xojo/plugin-compression.shtml) or [Chilkat-Plugin](https://www.chilkatsoft.com) to successfully compress the Word document!

It is also possible to write your own export method if you use TTsZipPackage, Einhugur plugins etc.

{% embed url="<https://www.dropbox.com/s/kozbvuu81xgspu7/WordIterator.xojo_binary_code?dl=0>" %}
Demo-Project
{% endembed %}

This demo runs only in debug mode and only with MBS Plugin. Simply drag and drop the WordIterator class into the Xojo Navigator and make sure that you have also imported the FTC classes so that the **FTIteratorBase** class is found. You will also find the call to save the FTC as a Microsoft Word document in the overview.

The class creates valid Microsoft Word documents (.docx) and was tested under macOS, Windows and Linux and exports all important formatting properties of the FTC:

## Character Properties

|                 | Microsoft Word | Apple Pages | Libre Office |
| --------------- | :------------: | :---------: | :----------: |
| BackgroundColor |        ✔       |      ✔      |       ✔      |
| Bold            |        ✔       |      ✔      |       ✔      |
| Italic          |        ✔       |      ✔      |       ✔      |
| Strikethrough   |        ✔       |      ✔      |       ✔      |
| Superscript     |        ✔       |      ✔      |       ✔      |
| Subscript       |        ✔       |      ✔      |       ✔      |
| TextColor       |        ✔       |      ✔      |       ✔      |
| TextFont        |        ✔       |      ✔      |       ✔      |
| TextSize        |        ✔       |      ✔      |       ✔      |
| Underline       |        ✔       |      ✔      |       ✔      |

## StyleRun

|              | Microsoft Word | Apple Pages | Libre Office |
| ------------ | :------------: | :---------: | :----------: |
| ColorOpacity |        ✔       |      —      |       —      |
| Hyperlink    |        ✔       |      ✔      |       ✔      |
| Picture      |        ✔       |      ✔      |       ✔      |
| Shadow       |        ✔       |      ✔      |       —      |

## Paragraph Properties

|                                                       | Microsoft Word | Apple Pages | Libre Office |
| ----------------------------------------------------- | :------------: | :---------: | :----------: |
| <p>Alignment</p><p>(<em>left, center, right)</em></p> |        ✔       |      ✔      |       ✔      |
| <p>BackgroundColor</p><p><em>(only local)</em></p>    |        ✔       |      ✔      |       ✔      |
| TabStops                                              |        ✔       |      ✔      |       ✔      |
| **Indentation**                                       |                |             |              |
| FirstIndent                                           |        ✔       |      ✔      |       ✔      |
| LeftMargin                                            |        ✔       |      ✔      |       ✔      |
| RightMargin                                           |        ✔       |      ✔      |       ✔      |
| **Spacing**                                           |                |             |              |
| AfterSpace                                            |        ✔       |      ✔      |       ✔      |
| BeforeSpace                                           |        ✔       |      ✔      |       ✔      |
| LineSpacing                                           |        ✔       |      ✔      |       ✔      |

## Document Properties

|                                                          | Microsoft Word | Apple Pages | Libre Office |
| -------------------------------------------------------- | :------------: | :---------: | :----------: |
| BackgroundColor                                          |        ✔       |      —      |       ⁇      |
| DefaultHyperlinkColor                                    |        ✔       |      ✔      |       ⁇      |
| DefaultHyperlinkColorVisited                             |        ✔       |      —      |       ⁇      |
| DefaultTabStop                                           |        ✔       |      ✔      |       ⁇      |
| <p>Margins</p><p><em>(Top, Left, Bottom, Right)</em></p> |        ✔       |      ✔      |       ✔      |
| <p>Size</p><p><em>(Width, Height)</em></p>               |        ✔       |      ✔      |       ✔      |
| Zoom                                                     |        ✔       |      —      |       ✔      |

{% hint style="info" %}
If you use a Page Background color <> white you should define a default Paragraph Style via FTC.DefaultParagraphStyle-Event. Otherwise all Paragraphs without ParagraphStyle have a white background color. But normally, you shouldn’t use a Page Background Color.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xojo.gitbook.io/add-ons/ftc-word-exporter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
