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

Free Support Forum - aspose.com

10.4 : InvalidOperationException - the stack is full- on doc.UpdateFields

Hello Aspose team

simple code to reproduce the issue :

License lic = new License();
lic.SetLicense(@"C:\mypath\Aspose.Total.lic");
Document doc = new Document(@"C:\mypath\SUB-FORPRO_FOREM_conv_OF.dot");
DataSet ds = new DataSet();
ds.ReadXml(@"C:\mypath\N03-Work.SupportServeur.xml");
doc.MailMerge.Execute(ds.Tables[0]);
doc.UpdateFields();

template and data file are in attachment

An InvalidOperationException is thrown on "doc.UpdateFields();" with the message " the stack is full"

I'm using Aspose.Words 10.4.0

Is there any workaround by modifying the template ? my customers can't wait a future release

Thanks

Hello

Thanks for your inquiry. 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 fixed.

While you are waiting for the fix you can try using the following code to work this problem around:

Document doc = new Document("C:\\Temp\\SUB-FORPRO_FOREM_conv_OF.dot");

DataSet ds = new DataSet();

ds.ReadXml("C:\\Temp\\N03-Work.SupportServeur.xml");

doc.MailMerge.Execute(ds.Tables[0]);

// Convert DOT to DOC

MemoryStream docStream = new MemoryStream();

doc.Save(docStream, SaveFormat.Doc);

doc = new Document(docStream);

doc.UpdateFields();

doc.Save("C:\\Temp\\out.doc", SaveFormat.Doc);

Best regards,

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


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