Free Support Forum -

executeWithRegions() throws exeception

java.lang.IllegalArgumentException: position at at com.aspose.words.fg.a( at com.aspose.words.fg.a( at com.aspose.words.vp.a( at com.aspose.words.Document.updatePageLayout( at at com.aspose.words.Document.AR( at com.aspose.words.Field.Gk( at com.aspose.words.Field.a( at com.aspose.words.oo.a( at com.aspose.words.oo.l( at com.aspose.words.ol.execute( at at com.aspose.words.oo.Jr( at com.aspose.words.yj.UL( at com.aspose.words.yj.a( at com.aspose.words.MailMerge.executeWithRegions( at nl.hsac.aspose.OpenDocx.main(


Thank you for additional information. Could you please attach your template and provide a code that will allow us to reproduce the problem? We will check the issue and provide you more information.

Best regards,

Since I’m using an XML file as data source there is quite a bit of code, when I put a breakpoint in my moveNext() implementation I can see the entire structure being traversed.

It seems to depend on the template I use: I’ve made a simpler template and then I don’t get the exception. I’ll see whether I can make a simpler code example that also shows the exception. In the meantime maybe you can compare the two documents (the one with the ‘2’ in the filename works) and see whether you can see why the larger one gives the exception…

Find attached the source (in an Eclipse project) that shows the problem.
It works for the ‘2’ docx, but throws an exception with the other docx…


Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards,

The issues you have found earlier (filed as WORDSNET-5066) have been fixed in this .NET update and in this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.