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

Free Support Forum - aspose.com

Exception thrown when calling Aspose.Words.Document.UpdateFields and CultureInfo set to French

Hi,

when calling Aspose.Words.Document.UpdateFields on attached document and having CurrentCulture set to French the following exception is thrown:

Key cannot be null.
Parameter name: key
at System.Collections.Hashtable.get_Item(Object key)
at x4adf554d20d941a6.x4e2f8bff72d83f71.x84448f134fcddce5(x398b3bd0acd94b61 xd7e5673853e47af4, Hashtable x9883c720593ff2cd)
at x4adf554d20d941a6.x4e2f8bff72d83f71.x17e48e42e094d16c(xa268fdb9ca040dde xd07ce4b74c5774a7)
at x4adf554d20d941a6.x4e2f8bff72d83f71.xc3819e13f60dd8e6()
at x59d6a4fc5007b7a4.xcde671c53995c411.xc3819e13f60dd8e6()
at xfbd1009a0cbb9842.xfedf115fd9c03862.x9652dd403d2a3873()
at xfbd1009a0cbb9842.xfedf115fd9c03862.xc55471c0f1365312()
at xfbd1009a0cbb9842.xfedf115fd9c03862.x384c03e4298b53bf(Node xda5bf54deb817e37)
at Aspose.Words.Range.UpdateFields()
at Aspose.Words.Document.UpdateFields()

To reproduce this bug use the attached document and the following code:

var testFile = new Document(“C:\Full-RgResult.docx”);
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(“fr-FR”);
testFile.UpdateFields();

Thank you,
Aurelian Iordache
IBM Romania

Hi Aurelian,


Thanks for your inquiry. After an initial test with Aspose.Words 14.3.0, I was unable to reproduce this exception on my side. I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. I hope, this helps.
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

Best regards,