# Mail Merge

> Mail merge in a Windows Forms ribbon app, from template to PDF: insert fields with RibbonReportingTab, merge invoice.json with MailMerge, add merge blocks.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for Windows Forms > Getting Started > Mail Merge
- **495 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/llms-full.txt

---

Invoices, letters and reports that share a layout but differ in their data are the classic case for mail merge: a template with merge fields and data that fills them. Three tutorials build one invoice from start to finish in a Windows Forms application, from the template designed in the editor to the merged PDF with a table of items.

### Choose a Tutorial

| Tutorial | You learn to | Main members |
|---|---|---|
| [Create a Template](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/template/llms-full.txt) | Add the Reporting tab, load sample data for its drop-downs, insert merge fields and save the template | `RibbonReportingTab`, `DataSourceManager.LoadJson`, `MergeField` |
| [Merge Data into Fields](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/fields/llms-full.txt) | Merge JSON data into the template, show the result, save it as PDF and find fields without data | `MailMerge`, `MergeJsonData`, `FieldMerged` |
| [Add Repeating Merge Blocks](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/blocks/llms-full.txt) | Repeat a table row for each item, with the ribbon or in code, and merge business objects | `InsertMergeBlock`, `InsertMergeBlockDialog`, `MergeObject` |

All three use the same sample data, *invoice.json*, and the same template, *invoice.docx*. Work through them in order.

![The Reporting tab of the Windows Forms ribbon with the groups Data Source, Merge Fields, Merge Blocks and View.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-winforms/ribbon-reporting-tab.f35a177d.webp)

### Before You Start

- Complete [Create a Ribbon Application with Sidebar Support](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/document-editor/ribbon-sidebar/llms-full.txt). The tutorials add the Reporting tab to its ribbon.
- Mail merge is part of the Enterprise and Professional editions. See [Editions and Feature Availability](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/editions/llms-full.txt).
- [MailMerge](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/overview/components/mailmerge/llms-full.txt) in the Overview explains the component, its data sources and the reporting user interface.

### After These Tutorials

- [Mail Merge and Reporting](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/mail-merge/llms-full.txt): data sources, fields, blocks, conditions, formatting and events in detail.
- [PDF Processing](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/pdf/llms-full.txt): add PDF options, forms and signatures to the merged documents.

---

## In This Section

- [Add Repeating Merge Blocks](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/blocks/llms-full.txt): Add a merge block to a Windows Forms template that repeats a table row for each item, with the Reporting tab or in code, and merge JSON or business objects.
- [Merge Data Into Fields](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/fields/llms-full.txt): Fill a DOCX invoice template in Windows Forms with MergeJsonData: import its fields with LoadSettings, merge in a ServerTextControl and save the result as PDF.
- [Create a Template](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/template/llms-full.txt): Design a mail merge template in a Windows Forms editor: the Reporting ribbon tab, sample JSON data for its drop-downs, merge fields in code and a DOCX template.

---

## Nearby

- **Previous:** [Print a Document](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/document-processing/print/llms-full.txt)
- **Next:** [Create a Template](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/getting-started/mail-merge/template/llms-full.txt)
