Aspose.Word - MailMerge Corrupts Document

Hi Guys,
I'm using Aspose.Word (version
Some of our documents don't seem to be working with Aspose.Word.
I have a source document that works fine in word, it has a number of "MergeFields".
I use Aspose.Word.Document.MailMerge.Execute(string[] fieldNames, object[] values) and save the document.
The document now crashes when you open it in word.
I have attached a sample of the original document & the mail merged document.
James Miles.


Here is the mail merged document.


The problem is caused by the organizational chart diagram in your document. Aspose.Word has trouble processing it correctly. I will try to fix this, but it could take a week or so. In the meantime you can workaround if you just paste an image instead of the organizatrional diagram object.


Alright... I'll do that as a tempory fix.


Any idea when this will actually be fixed?

Problem with a picture is if my clients need to change their organisational chart, they can’t.


James Miles



We are working on this. If all goes well, it could be available in the next 3-4 days.


Sorry I can’t fix organizational charts quickly. This requires more changes to the way Aspose.Word works with textboxes and shapes. This work is planned to be done in the next 2-3 months.


Hi Guys,

Has there been any movement on this front? At this stage id be happy if aspose just removed the chart from the document.

I just don’t want it to crash!


James Miles


Unfortunately it is not possible just to remove shapes that are causing problems from the document. There is no way now to define exactly if it would be safe for the overall document generation. You need either substitute it with a bitmap or remove it from template document altogether.

We plan a major upgrade for graphics support in Aspose.Words but it won't be soon.


I understand it might not be possible to remove the shapes but surely
its possible to throw an exception when you come across a document that
Aspose can’t handle?




This problem is logged in our defect base as Issue #676. We will try to repair it in the next release according to your suggestions.


That would be great.



Hi James,

Although there are improvements for shapes and graphics objects in next release Aspose.Words 3.6, there is yet no fix or solution for the organizational diagram issue that you reported.

This issue is still on out list of very important things to do. We do plan some major work on the shapes and graphics, hopefully this year.