Free Support Forum -

Change of behavior in MergeImageFieldEventArgs

We purchased Aspose.Word a couple of months ago and developed a little report generator with version I make use of MailMerge.MappedDataFields collection and HandleMergeField event in order to process custom merge fields: for instance, if the template contains a field named “upper#CustomerName”, I map it with the field “CustomerName”, and process it in HandleMergeField to make the field uppercase (that’s a very simple example).

Now we have upgraded to version because it contains a bug fix of our interest. My code doesn’t work any more because MergeImageFieldEventArgs.FieldName now returns a different name: the datasource field name (mapped). In the previous version, it returned the field name of the document. I suppose this change was made in version 2.1.13, although I think it is not explicitly said.

I can’t find any solution. Would it be possible for you to add both field names to MergeImageFieldEventArgs? Another useful information in MergeImageFieldEventArgs could be the row number of the datasource that is being merged.

I have attached a fragment of my code.

Thank you


Thank you for the suggestion, we will surely implement it.

Done. Added MergeFieldEventArgs.DocumentFieldName and MergeFieldEventArgs.RecordIndex in Aspose.Word 2.4. Will release in 1-2 days.

We have released Aspose.Word 2.4.

Thank you!!