I’m having problems getting calculated legacy form fields to work correctly (sample code below). When I open the output file in Word the contents of the field depend on the Aspose version - earlier versions have “!The Formula Not In Table” and later versions leave the field empty. I can double click that field then click “OK” in the options dialog without changing any settings to get it to update with the correct value, but I thought Aspose was able to update and populate calculated fields.
var doc = new Document();
var builder = new DocumentBuilder(doc);
builder.InsertBreak(BreakType.ParagraphBreak);
builder.InsertTextInput("text1", TextFormFieldType.Number, string.Empty, "1", 50);
builder.InsertBreak(BreakType.ParagraphBreak);
builder.InsertTextInput("text2", TextFormFieldType.Number, string.Empty, "1", 50);
builder.InsertBreak(BreakType.ParagraphBreak);
builder.InsertTextInput("text3", TextFormFieldType.Number, string.Empty, "1", 50);
builder.InsertBreak(BreakType.ParagraphBreak);
var field = builder.InsertTextInput("text4", TextFormFieldType.Calculated, string.Empty, string.Empty, 50);
field.CalculateOnExit = true;
field.TextInputDefault = "=SUM(text1, text2, text3)";
doc.UpdateFields();
doc.Save("test.docx");
Am I missing something?