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

Free Support Forum - aspose.com

Document.UpdateFields does not update the IF field correctly using .NET


I noticed issue with smart quotes in if statement.
In Word the smart quotes are taken like straight quotes and if the value inside matches, then it returns true. But in my case, the value inside quotes don’t match, because there’s difference in quote marks.

        var documentPath = @"D:\MyRepos\SmartQuoteInIfStatement\files\testfile.dotx";
        var document = new Document(documentPath);

        foreach (Field field in document.Range.Fields.ToArray())
            var ifField = field as FieldIf;
            if (ifField != null)
        Console.WriteLine("click any key to close");

testfile.zip (13.1 KB)

Could you check, please?



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-20046. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

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