TX Text Control .NET for Windows Forms

Mail Merge

Topic

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

TutorialYou learn toMain members
Create a TemplateAdd the Reporting tab, load sample data for its drop-downs, insert merge fields and save the templateRibbonReportingTab, DataSourceManager.LoadJson, MergeField
Merge Data into FieldsMerge JSON data into the template, show the result, save it as PDF and find fields without dataMailMerge, MergeJsonData, FieldMerged
Add Repeating Merge BlocksRepeat a table row for each item, with the ribbon or in code, and merge business objectsInsertMergeBlock, 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.

Before You Start

After These Tutorials