We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Taking more than 1 minutes to execute the mail merge document

We have using your product for a long time. Currently we are facing some time issue on mail merge execution. Earlier client was using same template and it was taking no time to merge the template now for 2021 he created a new version of the same template just adding the if condition to the whole previous ms word template. Now it is taking more than one minute to pass this function when it reaches to asposeDoc.MailMerge.Execute(dt). Please advise as we have a very large amount of documents to produce in coming months.


Please compress the following resources into ZIP format and attach the .zip file here for testing:

  • A simplified template Word document (you’re getting this problem with)
  • Please also create a standalone simplified Console Application (source code without compilation errors) that helps us to reproduce this problem on our end and attach it here for testing. Please do not include Aspose.Words DLL files in it to reduce the file size.
  • Please also provide information about the exact Aspose.Words’ old version number for which there were no problems on your side previously.

As soon as you get these pieces of information ready, we will then start investigation into your issue and provide you more information.

I am sending the sample project and required files as per your need to investigate the issue.

16.7: It is version we are currently using in our Project

These templatesAsposeLatest.7z (1.4 MB)
and sample datasource are available in Bin/Debug folder inside the project

TemplateWithTimeIssue.docx: It is a new template with execution time

OldTemplate.doc: Old template with no execution time issue.


After an initial test with the licensed latest (21.5) version of Aspose.Words for .NET, we were unable to reproduce this performance issue on our end. The whole process (loading NewTemplateWithTimeIssue.docx + populating data source + executing mail merge + converting to PDF) took just around 4,500 milliseconds on our end. So, we suggest you to please upgrade to the latest (21.5) version of Aspose.Words for .NET.

  • PDF output produced on our end is: output.pdf (30.4 KB)

Thanks for quick response Hafeez, in previous sample the condition is executed the else part and only single page is printed. Can you please execute the document when it is showing the complete pages of the template and then estimate the execution time with the latest version. I am sending the sample project with changed condition so that produce the full document.AsposeLatest.7z (1.4 MB)


When using 21.5 version of Aspose.Words for .NET, the whole process took just 3675 milliseconds on my end. Also, please check the following output PDF file: