This repository contains examples that illustrates how to mail merge Word documents in C# and VB.NET using .NET Word library (Essential® DocIO) without Microsoft Word or Office interop dependencies.
Mail merge is a process of merging data (replacing merge fields) from a data source into the template Word document.
The Word library (Essential® DocIO) has a powerful mail merge API to generate personalized reports like letters, pre-addressed envelopes, address labels, invoice, payroll, and more. It performs mail merge faster in a batch process without Microsoft Word or Office interop dependencies. The generated reports can be saved as a Word document, PDF, image, HTML, and more.
-
Envelopes for mailing in C# - Create envelopes for mailings to the list of recipients.
-
Generate multiple Word documents in C# - Create a batch of personalized letters as individual document for each record.
-
Create and send email messages in C# - Create and send email messages by converting merged document to HTML.
-
Personalized letters in C# - Create personalized letters for selected recipient from the mailing list.
-
Order details of a customer in C# - Generate order details of a customer using nested mail merge.
-
Barcode labels in C# - Generate a barcode labels for grocery store.
-
Mail merge using Excel Spreadsheet in C# - Import data from Excel Spreadsheet and generate a report.
-
Product catalog in C# - Generate a product catalog and formatting the merged text.
-
Replace merge field with HTML in C# - Replace merge field with HTML string using mail merge.
-
Fit the photo within text box in C# - Fit the photo within the text box in the Word document using mail merge.
-
Start each record on a new page in C# - Generate each record in new page while executing group mail merge.
Envelopes for mailing
Batch of personalized letters
Barcode labels
Replace merge field with HTML
Fit photo within text box
Start each record on a new page
The Syncfusion® DocIO is a .NET Word library allows you to add advanced Word document processing functionalities to any .NET application and does not require Microsoft Word application to be installed in the machine. It is a non-UI component that provides a full-fledged document instance model similar to the Microsoft Office COM libraries to iterate with the document elements explicitly and perform necessary manipulation.
- Support to create Word document from scratch.
- Support to open (read), modify and save existing Word documents.
- Advanced Mail merge support with different data sources.
- Ability to create or edit Word 97-2003 and later version documents (DOCX), and convert them to commonly used file formats such as RTF, WordML, TXT, HTML and vice versa.
- Ability to export a Word document as an Image and PDF
- Ability to merge and split Word documents.
- Support to compare two DOCX format documents.
- Ability to create and manipulate charts, Shapes, and Group shape in DOCX and WordML format documents.
- Ability to read and write Built-In and Custom Document Properties.
- Ability to find and replace text with its original formatting.
- Ability to insert Bookmarks and navigate corresponding bookmarks to insert, replace, and delete content.
- Support to insert and edit the form fields.
- Support to protect the document to restrict access to the elements present within the document.
- Ability to encrypt and decrypt Word documents.
- Support to insert and extract OLE objects.
- Support to run the DocIO applications in multi-thread and its thread safe.
- Microsoft Word 97-2003
- Microsoft Word 2007
- Microsoft Word 2010
- Microsoft Word 2013
- Microsoft Word 2016
- Microsoft Word 2019
- Microsoft 365
- Creates, reads, and edits popular text file formats like DOC, DOT, DOCM, DOTM, DOCX, DOTX, HTML, RTF, TXT, Markdownand XML (WordML).
- Converts Word documents also to PDF, Image, and ODT files.
- Download this project to a location in your disk.
- Open the solution file using Visual Studio.
- Rebuild the solution to install the required NuGet packages.
- Run the application.
- Product page: .NET Word Library
- Documentation: .NET Word library
- Online demo: .NET Word library - Online demos
- Blog: .NET Word library - Blog
- Knowledge Base: .NET Word library - Knowledge Base
- Ebooks: .NET Word library - Ebooks
- FAQ: .NET Word library - FAQ
For any other queries, reach our Syncfusion® support team or post the queries through the community forums.
Request new feature through Syncfusion® feedback portal.
This is a commercial product and requires a paid license for possession or use. Syncfusion's licensed software, including this component, is subject to the terms and conditions of Syncfusion's EULA. You can purchase a licnense here or start a free 30-day trial here.






