Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Mon Feb 28, 2022 2:01 pm

I am aware it is possible to perform mail merge with a region using a data source like the following:

Code: Select all
document.getMailMerge().executeWidthRegion("Data.xml");


What if I had a list of objects like below and wanted to perform a mail merge without first serializing the list to XML, is this possible?

Code: Select all
List<Object> list = new List<Object>();

cjericho
 
Posts: 17
Joined: Wed Jan 19, 2022 11:38 am

Tue Mar 01, 2022 7:15 am

Hello,

Thank you for your inquiry.
Yes, it is possible to perform a mail merge. I have attached a sample code (contains input word file and result word file). Please check if it meets your needs. If it does not meet your needs, please provide your input word file and expected result file, so that we can better provide sample code that meets your needs. You could attach them here or send them to us via email (support@e-iceblue.com). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Wed Mar 02, 2022 12:01 pm

This solves my problem, thank you for your help!

cjericho
 
Posts: 17
Joined: Wed Jan 19, 2022 11:38 am

Thu Mar 03, 2022 1:07 am

Hello,

You are welcome.

If you encounter other issues related to our products in the future, please feel free to contact us.

Have a nice day!

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.Doc

cron