English Indonesia Tiếng Việt عربي Español Italiano Türk فارسی Français Português Русский ไทย

Create DOC Documents with Mail Merge in C#

Streamline your DOC document creation process by programmatically generating DOC files using Mail Merge technology. The C# API handles all aspects of the Mail Merge operation, helping you save time and ensure maximum accuracy in your results.

Key Features

  • Generation of DOC documents based on templates with Merge Field support.
  • Dynamic content insertion, including text, tables, images, and form fields in output DOC files.

Use Cases

  • Business DOC Documents. Create contracts, proposals, or agreements in DOC format with client-specific information.
  • Personalized DOC Reports. Create customized DOC reports by combining data from databases or other sources.
  • Batch Processing of DOC Files. Automatically create hundreds of DOC files from a single template with different data sets.

By integrating Wordize Mail Merge capabilities into your .NET projects, developers can create professional solutions for DOC document generation and automation. Install our library to try the capabilities of generating customized DOC documents in your C# software today.

C#
Run code
Upload your document template
Upload your data source (XML, JSON, CSV)
Select the target format from the list
using System.Data;
using Newtonsoft.Json;
using Wordize.MailMerging;

string json = File.ReadAllText("DataSource.json");
DataTable dataTable = JsonConvert.DeserializeObject(json);
MailMerger.Execute("Input.doc", "Output.doc", SaveFormat.Doc, dataTable);
using System.Data;
using Wordize.MailMerging;

DataSet dataSet = new DataSet();
dataSet.ReadXml("DataSource.xml");
MailMerger.Execute("Input.doc", "Output.doc", SaveFormat.Doc, dataSet.Tables[0]);
Run code

How to generate DOC files in C# using Mail Merge

  1. Install the C# library for generating DOC files using Mail Merge technology.
  2. Add a reference to the library (import the library) in your C# project.
  3. Call the MailMerge method to generate DOC through Mail Merge.

System Requirements

Our product is fully cross-platform and supports all major .NET implementations:

  • .NET ≥ 5.0
  • .NET Core ≥ 2.0
  • .NET Standard ≥ 2.0
  • .NET Framework ≥ 3.5
  • MonoMac
  • MonoAndroid
  • Xamarin

As far as .NET code doesn't depend on the underlying hardware or operating system, but only on a Virtual Machine, you are free to develop any kind of software for Windows, macOS, Android, iOS and Linux. Just make sure you have installed the corresponding version of .NET Framework, .NET Core, Windows Azure, Mono or Xamarin.

We recommend using Microsoft Visual Studio, Xamarin, and MonoDevelop integrated development environments to create C#, F#, VB.NET applications.

5%