Word Mail Merge Performance


From John:

I Just tried your evaluation copy.

Sorry to say the performance doing a mail merge with any significant amount of data is woeful. I have about 2,000 rows (ie that’s 2,000 pages to be produced from the template) and each page has about 9 word mail merge fields.

I even tried selecting Top 500 to see if it would return but to no avail.
You may want to check out the way you’re looping…or cleaning up objects.

Using MS Word takes about 2 minutes with 2,000 rows.
Not a networking problem - I’m all local from database to server to client.

Here’s my code:

Public Function testApose(ByVal dataTable As DataTable) As Document

Dim app As Word = New Word
Dim templateDoc As Document = app.Open(“d:\test\template\xxx.doc”)

Dim mergedDoc As Document = templateDoc.MailMerge.Execute(dataTable) '<— never returns from here.

mergedDoc.Save(“test.doc”, SaveFormat.FormatDocument, SaveType.OpenInWord, Me.Response)

End Function




Hi John,

2000 pages is a pretty big document even for MS Word I think.
We’ve done some performance tests and on reasonably complex documents but not on such number of records.
Could you send the document you are using to word@aspose.com and I will include it into our performance testing programme.
We are keen to at least match MS Word performance and exceed it whenever possible.


In order to replicate create any word doc with 10 merge fileds and merge with say 2000 records from somewhere.

You may want to look at providing a callback to at least allow developers hook into the progress…?


Hi John,

We will do some performance optimization for this type of load before our next major release Aspose.Word 1.2 on 1st of March.

Callbacks is a good idea. We might add it a little later. We already thought about providing callbacks because we plan to support merge of user images into mail merge fields.