# Working With Files

> Load and save RTF, HTML, XML, DOCX, DOC, text and the native format with TXTextControl, export PDF, and write file headers or several controls to one file.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control ActiveX > Document Editor > Working With Files
- **575 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/document-editor/load-save/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/document-editor/load-save/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/document-editor/load-save/llms-full.txt

---

TX Text Control works with eight file formats, from its own native format for document files to RTF, HTML, XML, Word and plain text, and it exports PDF. Which one you choose decides what else can go into the file: the exchange formats hold the contents of one `TXTextControl`, while the native format can carry a file header or the contents of several controls.

### Supported File Formats

| Format | Used for |
|---|---|
| Native TX Text Control format | Storing data in document files, the format you normally use |
| Rich Text Format (RTF) | Exchanging formatted text with other applications |
| HTML | Loading and saving HTML documents |
| XML | Loading and saving XML documents |
| Microsoft Word (*.docx*) | Loading and saving Word documents |
| Microsoft Word 97-2003 (*.doc*) | Loading and saving Word 97-2003 documents |
| Unformatted text | Text in ANSI or Unicode format |
| Adobe PDF | Exporting documents only |

### Load and Save a Format

To use RTF, HTML, Word or unformatted text, pass the format you want as a parameter of the [Load](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/load-method/llms-full.txt) or [Save](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/save-method/llms-full.txt) method. The reference pages of both methods list the format identifiers.

With RTF, HTML, Word and unformatted text, a file holds the contents of a single `TXTextControl`: you read them from the file or write them to it, and nothing else.

In the TXWords sample, the user chooses the format in the **Save as type** list of the **Save As** dialog box:

![The Save As dialog box of the TXWords sample with the Save as type list open, offering TX Words Format, Rich Text Format, Plain Text Format (ANSI), Plain Text Format (Unicode), Microsoft Word Format and Hyper Text Markup Language, in the look of TX Text Control 10](https://docs.textcontrol.com/assets/img/tx-text-control-activex/save-as-file-types.c1ffe6fc.webp)

### Combine Data in One File

The native file format goes further:

- **A file header.** You can write a header of your own to the file before you save the `TXTextControl` data.
- **Several controls.** You can write the contents of several `TXTextControl` controls to one file.

### Next Steps

- [Mail Merge](https://docs.textcontrol.com/tx-text-control-activex/mail-merge/llms-full.txt): the sample program writes the contents of `TXTextControl` and other data to a single file.
- [A Word Processor](https://docs.textcontrol.com/tx-text-control-activex/document-editor/word-processor/llms-full.txt): the TXWords sample writes a file header before the `TXTextControl` data and uses RTF, HTML, Word and unformatted text.
- [File Drag and Drop](https://docs.textcontrol.com/tx-text-control-activex/document-editor/drag-drop/llms-full.txt): loading a file that the user drops on the control.
- [PDF Export](https://docs.textcontrol.com/tx-text-control-activex/pdf/llms-full.txt): creating PDF documents.

---

## Nearby

- **Previous:** [Text Formatting and Views](https://docs.textcontrol.com/tx-text-control-activex/document-editor/viewing/llms-full.txt)
- **Next:** [File Drag and Drop](https://docs.textcontrol.com/tx-text-control-activex/document-editor/drag-drop/llms-full.txt)
