# Flow Type Layout Reporting Series: Creating a Simple Mailing

> Mail merge templates in TX Text Control Words combine static text with dynamic merge fields. This tutorial walks through connecting an Excel data source via ODBC, inserting address merge fields, adding a formatted date field, and previewing the merged output with sample records.

- **Author:** Bjoern Meyer
- **Published:** 2013-04-03
- **Modified:** 2026-03-05
- **Description:** Mail merge templates in TX Text Control Words combine static text with dynamic merge fields. This tutorial walks through connecting an Excel data source via ODBC, inserting address merge fields, adding a formatted date field, and previewing the merged output with sample records.
- **4 min read** (644 words)
- **Tags:**
  - Tutorial
- **Web URL:** https://www.textcontrol.com/blog/2013/04/03/flow-type-layout-reporting-series-creating-a-simple-mailing/
- **LLMs URL:** https://www.textcontrol.com/blog/2013/04/03/flow-type-layout-reporting-series-creating-a-simple-mailing/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2013/04/03/flow-type-layout-reporting-series-creating-a-simple-mailing/llms-full.txt

---

![Blog Series: Flow Type Layout Reporting](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/blog_series_reporting.webp "Blog Series: Flow Type Layout Reporting")In this tutorial, you will learn how to create a simple template for a typical mail merge letter. This template consists of static text, the current date and the addressed person. A sample database and the final template is available for review.

1. In a first step, open the template designer **TX Text Control Words**. This application is your designer to create, modify or test your templates for the TX Text Control reporting classes.
2. In the **Mailings** tab, choose *Select Data Source*.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_1.webp "Open a data source")
    
    This tutorial shows how to use an Excel file as the data source. You could use all types of databases for your reports.
    
    In the opened database connection wizard, choose *Microsoft ODBC Data Source* as the *Data source* and confirm with *OK*.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_2.webp "Open a data source")
    
    Select *Use connection string* as the *Data source specification* and click the *Build...* button.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_3.webp "Open a data source")
    
    In the second tab page of the following dialog, select *Excel* from the list of available *Machine Data Sources* and confirm with *OK*.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_4.webp "Open a data source")
    
    Choose the sample Excel file *address.xlsx* and confirm with *OK*.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_5.webp "Open a data source")
    
    Close the underlying dialog as well by clicking *OK.*
3. Open the drop-down button *Select Table* and select the table *Addresses$*.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_6.webp "Open a data source")
4. Now start to insert the address fields into the template by choosing them from the *Insert Merge Field* drop-down button.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_7.webp "Open a data source")
    
    Start with the *firstname* and add a space after the field. After that, add the field *name* to the template. Insert a new line by pressing *Enter* and repeat the above steps for the *street*, *city* and *country*. The document should look like this:
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_8.webp "Open a data source")
5. In order to insert the current date, add some blank lines and choose *Date* from the *Insert Special Field* drop-down button.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_9.webp "Open a data source")
    
    Choose the desired format of the date field such as *dddd, d. MMMM yyyy* and confirm with *OK*.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_10.webp "Open a data source")
6. In the last step, you could add some additional text and apply some formatting to the text and fields. The final template could look like shown in the following screenshot:
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_11.webp "Open a data source")
7. Finally, click on *Preview* to see the template in action. Use the arrow icons to navigate through the records.
    
    ![Open a data source](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/tx_tutorial_12.webp "Open a data source")

You can download the template and the sample data source [here](https://s1-www.textcontrol.com/assets/dist/blog/2013/04/03/a/assets/address.zip).

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [Windows Forms Tutorial: Create Your First Windows Forms C# Application](https://www.textcontrol.com/blog/2024/08/26/windows-forms-tutorial-create-your-first-windows-forms-csharp-application/llms.txt)
- [How to Mail Merge MS Word DOCX Documents in ASP.NET Core C#](https://www.textcontrol.com/blog/2023/10/16/how-to-mail-merge-ms-word-docx-documents-in-aspnet-core-csharp/llms.txt)
- [Creating an Angular Document Editor Application with a Node.js WebSocket Server](https://www.textcontrol.com/blog/2023/08/24/creating-an-angular-document-editor-application-with-a-nodejs-websocket-server/llms.txt)
- [Adding SVG Watermarks to Documents](https://www.textcontrol.com/blog/2022/01/28/adding-svg-watermarks-to-documents/llms.txt)
- [Using MailMerge in ASP.NET Core 6 Web Applications](https://www.textcontrol.com/blog/2022/01/27/using-mailmerge-in-aspnet-core-6-web-applications/llms.txt)
- [DocumentViewer for React Prerelease](https://www.textcontrol.com/blog/2020/10/27/document-viewer-for-react-prerelease/llms.txt)
- [New DocumentViewer Signature Tutorial Sample](https://www.textcontrol.com/blog/2020/08/18/new-documentviewer-signature-tutorial-sample/llms.txt)
- [Creating an ASP.NET MVC DocumentViewer Application With Razor](https://www.textcontrol.com/blog/2020/01/01/creating-an-aspnet-mvc-documentviewer-application-with-razor/llms.txt)
- [Creating Your First Windows Forms Application with C#](https://www.textcontrol.com/blog/2020/01/01/creating-your-first-windows-forms-application-with-csharp/llms.txt)
- [Creating Your First WPF Application](https://www.textcontrol.com/blog/2020/01/01/creating-your-first-wpf-application/llms.txt)
- [Creating a WPF Ribbon Application](https://www.textcontrol.com/blog/2020/01/01/creating-a-wpf-ribbon-application/llms.txt)
- [Integrate Document Editing into any HTML Client using the HTML Widget](https://www.textcontrol.com/blog/2020/01/01/integrate-document-editing/llms.txt)
- [Creating an ASP.NET MVC Application With Razor](https://www.textcontrol.com/blog/2020/01/01/creating-an-aspnet-mvc-application-with-razor/llms.txt)
- [Creating A Windows Forms Ribbon Application](https://www.textcontrol.com/blog/2020/01/01/creating-a-windows-forms-ribbon-application/llms.txt)
- [Creating Your First ASP.NET Reporting Application](https://www.textcontrol.com/blog/2020/01/01/creating-your-first-aspnet-reporting-application/llms.txt)
- [Creating an ASP.NET Web Forms AJAX Application](https://www.textcontrol.com/blog/2020/01/01/creating-an-aspnet-web-forms-ajax-application/llms.txt)
- [Creating a WebSocket Server Project with Node.js](https://www.textcontrol.com/blog/2020/01/01/creating-a-websocket-server-project-with-nodejs/llms.txt)
- [Creating an Angular Document Editor Application](https://www.textcontrol.com/blog/2020/01/01/creating-an-angular-document-editor-application/llms.txt)
- [ReportingCloud .NET Core Quickstart Tutorial](https://www.textcontrol.com/blog/2019/07/24/reportingcloud-dotnet-core-quickstart-tutorial/llms.txt)
- [Document Permissions and Password Encryption](https://www.textcontrol.com/blog/2019/07/05/document-permissions-and-password-encryption/llms.txt)
- [New Online Sample: Build your First Report](https://www.textcontrol.com/blog/2019/07/03/build-your-first-report/llms.txt)
- [Create your First Document with ReportingCloud](https://www.textcontrol.com/blog/2019/02/19/create-your-first-document-with-reportingcloud/llms.txt)
- [MailMerge: Starting Each Merge Block on a New Page](https://www.textcontrol.com/blog/2016/09/09/mailmerge-starting-each-merge-block-on-a-new-page/llms.txt)
- [Windows Forms and WPF: End a List on Return when Line is Empty](https://www.textcontrol.com/blog/2016/08/26/windows-forms-and-wpf-end-a-list-on-return-when-line-is-empty/llms.txt)
- [Using IFormattedText Objects to Access Elements Across All TextParts in a Document](https://www.textcontrol.com/blog/2016/08/25/using-iformattedtext-objects-to-access-elements-across-all-textparts-in-a-document/llms.txt)
