Free Support Forum - aspose.com

Range.updatefields

I am using Range.UpdateFields() to link some files into my document but it just doesnt update in word, help anyone?

I have attached sample docs and code of what iam doing but here it is again:

Dim builder As DocumentBuilder

Dim doc As New Document

doc = New Document("C:\test.doc")

builder = New DocumentBuilder(doc)

builder.MoveToDocumentStart()

builder.InsertField("LINK Excel.Sheet.8 C:\\test.xls", "")

builder.InsertField("LINK PowerPoint.Show.8 C:\\test_2.ppt", "")

doc.Range.UpdateFields()

doc.Save("C:\test.doc")

At the moment Range.UpdateFields updates the results of DOCPROPERTY and DOCVARIABLE fields only. It is mentioned in API reference. We plan to add support for updating more fields in the future.