Hi Support,
It seems like update fields function can not work well for field INCLUDETEXT. In my below test, I found a very interesting thing. If the included document is located in C:\Documents and Settings\Administrator\Local Settings\Temp\ folder, the update fields function will get the error of “Error! Not a valid filename”. But if the included document is located in c:, it can work well. Please reference the below test code. Please confirm it is a defect.
BTW, Aspose I used is 10.4.0.
Thanks.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.writeln("The first wrong:");
String fieldCode = "INCLUDETEXT \"C:\\Documents and Settings\\Administrator\\Local Settings\\Temp\\included.doc \" \\* MERGEFORMAT";
builder.insertField(fieldCode, "");
builder.writeln();
builder.writeln("The second wrong:");
String fieldCode2 = "INCLUDETEXT \"C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\included.doc\" \\* MERGEFORMAT";
builder.insertField(fieldCode2, "");
builder.writeln();
builder.writeln("The correct:");
String fieldCode3 = "INCLUDETEXT \"C:\\included.doc\" \\* MERGEFORMAT";
builder.insertField(fieldCode3, "");
doc.save("c:\\test-out.doc");
doc.updateFields();
doc.save("c:\\test-out.pdf");