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

Free Support Forum - aspose.com

document.UpdateFields() gives error (String cannot be of zero length.\r\nParameter name: oldValue)

Hello Aspose Team,

I am using Visual Studio 2015 and I am upgraded to Aspose.Words version 11.9.0.0 to 17.6.0.0. And then I had this following error while calling this method “document.UpdateFields()”.

Error: String cannot be of zero length.\r\nParameter name: oldValue

It was worked before I used Aspose.Words version 11.9.0.0 with Visual Studio 2013. After update both Visual Studio & Aspose.Words, it is not working now. Also, I get the latest Aspose.Words version 17.8.0.0 and tested, the error still occurs.

Could you suggest me?
MergeDoc.zip (32.3 KB)

@manig,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for .NET 17.8 and have not found the shared issue. Please make sure that you are using the Aspose.Words for .NET 17.8 and same documents that you shared.

Hello tahir.manzoor,

Sorry for the limited input we gave you earlier. This problem has occured only in our real environment.
There we have set the Culture as 'CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture(“de-CH”) & numberFormat.CurrencySymbol = “” .
This issue occurs only after setting the ‘numberFormat.CurrencySymbol’ as empty. In earlier Aspose versions, this was working. But in the latest version (17.8.0.0) this is not working.

We have attached the solution with the culture and curreny settings I have mentioned above.

Could you please suggest us how to fix this?

Note : We have removed the ‘Aspose.Word’ dll from this attachement, we could not upload the file, because size is exceeds the limit. Please attach the latest Aspose Word dll and test.
AsposeWordMerge.zip (92.8 KB)

@manig,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15831. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@manig,

The issues you have found earlier (filed as WORDSNET-15831) have been fixed in this Aspose.Words for .NET 17.10 update and this Aspose.Words for Java 17.10 update.