The SfRichTextBoxAdv control does not have built-in support
for mail merge functionality, but it is possible to perform mail merge using DocIO
and then open the merged document in the SfRichTextBoxAdv control.
We have created a sample application to demonstrate this process, which can be
downloaded from below.
In the attached sample,
1. Clicking on the "Insert merge field" option opens a new window
where you can type the merge field that you want to insert.
As of now, we have defined merge fields and corresponding values. Please insert
any of the fields listed below and modify the fields and values as per your
requirement.
Merge fields = "EmployeeId", "Name", "Phone", "City"
Merge values = "1001", "Peter", "+122-2222222", "London"
|
2. The button labeled "Execute Mail Merge" will perform the mail
merge operation using DocIO and save the resulting document as a DOCX file.
After the merge operation is completed, the mail-merged document will be opened
in the SfRichTextBoxAdv control for further editing or viewing.
3. Button “Save Document” is to save the final document in the required format.
Please use the below UG link to know more about the mail merge operation in the
DocIO
https://help.syncfusion.com/file-formats/docio/working-with-mail-merge
Attachment:
InsertMergeField_f7f032a1.zip