# Mail Merge

> Merge database records into Marked Text Fields of a template with TXTextControl in Visual Basic 6, print queued records and let users build templates.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control ActiveX > Mail Merge
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/mail-merge/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/mail-merge/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/mail-merge/llms-full.txt

---

## On This Page

- [How the Sample Program Is Organized](https://docs.textcontrol.com/tx-text-control-activex/mail-merge/#how-the-sample-program-is-organized)
- [Find the Right Page](https://docs.textcontrol.com/tx-text-control-activex/mail-merge/#find-the-right-page)
- [Pages in This Section](https://docs.textcontrol.com/tx-text-control-activex/mail-merge/#pages-in-this-section)

---

## In This Section

- [Connecting to Databases](https://docs.textcontrol.com/tx-text-control-activex/mail-merge/databases/llms.txt): Save and load TXTextControl documents as RTF in a database text field with SaveToMemory, LoadFromMemory and DAO in Visual Basic 6, and pick a compact format.
- [Dynamic Template Generation](https://docs.textcontrol.com/tx-text-control-activex/mail-merge/dynamic-templates/llms.txt): Build a Visual Basic 6 mail merge layout editor: insert fields of any database into a template, create labels at run time and save the database name with Save.
- [Merging Database Data and Text](https://docs.textcontrol.com/tx-text-control-activex/mail-merge/merging-data/llms.txt): Fill the Marked Text Fields of a template with a database record in Visual Basic 6: find fields by FieldData name with FieldNext, set FieldText with DAO.
- [Printing More Than One Record](https://docs.textcontrol.com/tx-text-control-activex/mail-merge/multiple-records/llms.txt): Queue database records in a list box and print each merged document with a hidden TXTextControl in Visual Basic 6 using SaveToMemory and PrintPage.

---

## Nearby

- **Previous:** [Built-In Dialog Boxes](https://docs.textcontrol.com/tx-text-control-activex/document-editor/dialog-boxes/llms.txt)
- **Next:** [Merging Database Data and Text](https://docs.textcontrol.com/tx-text-control-activex/mail-merge/merging-data/llms.txt)
