Our solution provides a powerful platform independent API. Use our Mail merge document API to develop high-level software for C++ platform. This is a powerful software solution for merging templates in Word and PDF formats and data from custom data sources and further exporting the result to DOCX, PDF, HTML and other popular formats using C++.
With our product API, you can create personalized documents using the Mail merge Word template, data from a custom data sources and Mail merge feature in C++. Mail merge Word template is a document in Word format with merge fields – special fields where you want to insert personalized data from your data source.
The data source is a custom data store from which data is pulled during the Mail merge operation to be substituted into appropriate fields of Word template.
You can build reports based on Mail merge Word using the merge operation. Simply create an Word template with merge fields that can be used for report generation and select your data source. You can even generate reports from Excel data if you collect it there.
To try our Mail merge feature, load a Word template with merge fields and fill in these fields through our interface. After running the code, export the report in a convenient format generated using C++.
The following example shows how to perform a Mail merge operation in C++:
dotnet add package Aspose.Words.Cpp
Copy
using namespace Aspose::Words;
auto fields = MakeArray<String>(
{
});
auto values = MakeArray<SharedPtr<Object>>(
{
});
auto doc = MakeObject<Document>(u"Input.docx");
doc->get_MailMerge()->Execute(fields, values);
doc->Save(u"Output.docx");
There are three options to install Aspose.Words for C++ to your developer environment. Please choose one that resembles your needs and follow the step-by-step instructions:
You can use this C++ library to develop software on Microsoft Windows, Linux and macOS operating systems:
If you develop software for Linux or macOS, please check information on additional library dependencies (fontconfig and mesa-glu open-source packages) in Product Documentation.
You can perform Mail merge operation for other file formats: