
The Syncfusion mail merge API populates the template Word document with data from all the common data sources of. Generated letterĪ complete, working example can be downloaded from GitHub. Releases the resources occupied by WordDocument instance.īy executing the application, you will get the output Word document as follows. Saves the Word document in DOCX format. Performs the mail merge.ĭ(fieldNames, fieldValues) Step 6: Execute mail merge on the Word template and generate the final letter as a Word document. The switch “\* Upper” in the merge field FirstName displays the result in upper case as “FIRSTNAME”. You can define how the merge field result should be displayed in your final report by adding necessary format switches in the merge field. If you want to replace a merge field with an image, then define the merge field name with the prefix “Image:”.įor example, the merge field name should be like: “Image:Photo” («Image:MergeFieldName») The template document can be downloaded from LetterTemplate.docx. This mail merge example uses the following template Word document. By using a Word editor application, you can take advantage of the visual interface to design a unique layout, formatting, and more for your letter template interactively. Creating a template Word documentĬreate a template Word document with merge fields for generating a personalized letter using any Word editors, like Microsoft Word.
#Conditional merges in word for labels how to
Let’s learn how to generate personalized letters step by step through the mail merge process on a Word document in C# using Syncfusion’s mail merge API. NET Word Library Mail merge in C# using Syncfusion mail merge API The mail merge process pulls the information from the data source and replaces the merge fields (placeholders) in your template Word document.

The mail merge process involves three documents: Mail merge is a process of creating multiple documents with similar text, graphics, layout, and formatting by replacing the placeholder (merge fields) with specific information such as name, address, etc., from a data source into each Word document to create personalized, individual documents such as letters, labels, envelopes, or email messages.

In this blog, we are going to learn how to perform mail merge in C# and use other mail merge features.

The resultant documents can be saved as Word documents (DOC, DOCX), PDFs, images, HTML, and more. It saves you effort and time by helping you automate the generation of personalized documents programmatically in C# and VB.NET. NET Word Library has powerful mail merge APIs to generate personalized reports like letters, invoice, payroll, and email content. NET Word Library (Essential DocIO) without Microsoft Word or Office interop dependencies. Today I am going to show you how to perform mail merge in C# using the Syncfusion.
#Conditional merges in word for labels software
BoldSign – Electronic Signature Software New.
