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

Free Support Forum - aspose.com

FieldMergingCallback can not be called when merge regions

Hi
I updated Aspose.word for java to the latest version recently. When I test compatiblity, I got a question.

There are three kind of data defined with tablestart tag and tableend tag(will call MailMerge.executeWithRegions to merge). But fields in two tables are not merged, even call back method is not called.

Could you please give me some support?
Thanks

I have some update
The call back method is not called because no data in the datasource
But, what confused me is that the original tag in the template is remained in the output word doc.
How do I set mailmerge object?

Hi

Thanks for your request. If you need to remove the region that has no data, you should simply set RemoveEmptyRegions option before executing mail merge:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/com/aspose/words/mailmerge.html#RemoveEmptyRegions

Please let us know if you need more assistance, we are always glad to help you.

Best regards,