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

Free Support Forum - aspose.com

insertField issue in Office 2003 cannot load data

Dear Support:
i am using builder.insertField to put field code: LINK Excel.Sheet.8 into word, but doesn’t work.

string fieldCode = "LINK Excel.Sheet.8 \"C:\\\\temp\\\\Book1.xls\" \"Sheet1!R1C1:R1C3\" \\a \\p";
builder.InsertField(fieldCode, "");

anything wrong? thanks for your help

Thanks for your inquiry. I tried the following simple code and all works fine.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
string fieldCode = "LINK Excel.Sheet.8 C:\\\\Temp\\\\test.xls";
builder.InsertField(fieldCode, "");

You just should update fields in the document (Ctrl+A and then F9). Aspose.Words does not update LINK fields.
Best regards.

your are the best!,

thanks btw, do you know how to setup word to update automatically, thanks

Thanks for your inquiry. As workaround you can use a macro to automatically update fields. See the following link for more information.
I hope this could help.
Best regards.

thanks for your replay, i found that if i do copy and paste in word, the field will automatically update, but if use Aspose i need to do Ctrl A and F9 then the field get updated, i am not sure if word doesn’t recognize insertField in the beginning … if Aspose can do exectly like word does will be great.

Unfortunately Aspose.Words can’t update fields automatically. At the moment Aspose.Words can update the results of DOCPROPERTY and DOCVARIABLE fields only. For more information see FAQ.
Best regards.