Mail Merge
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 | 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 | 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 | 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.

Before You Start
- Complete Create a Ribbon Application with Sidebar Support. The tutorials add the Reporting tab to its ribbon.
- Mail merge is part of the Enterprise and Professional editions. See Editions and Feature Availability.
- MailMerge in the Overview explains the component, its data sources and the reporting user interface.
After These Tutorials
- Mail Merge and Reporting: data sources, fields, blocks, conditions, formatting and events in detail.
- PDF Processing: add PDF options, forms and signatures to the merged documents.