Error while using UpdateFields

Hi

When I run the following code:

Dim lobjWordDoc As Aspose.Word.Document = New Aspose.Word.Document(Path)

lobjWordDoc.BuiltInDocumentProperties.Title = K2txtInitName.Text
lobjWordDoc.CustomDocumentProperties("Project Name").Value = K2txtInitName.Text

lobjWordDoc.Range.UpdateFields()
lobjWordDoc.Save(Path)

I get this exception when running UpdateFields.:

Accesing result of a field that does not have a separator. For free technical support, please post this error and the file in the Aspose.Word Forums http://www.aspose.com/forums/ShowForum.aspx?ForumID=75

I’m trying to let the custom properties in the document update so that it shows the update text.

Can anyone help me? If you need the document, just say so.

Thank you.

Hi,

Thank you for considering Aspose.

Sure, please attach the problematic document.

OK, so this is the document just after I updated it using the code, without saying doc.Range.UpdateFields(). If you press Ctrl+A, F9 then you’ll see the document properties has values.

Am I right in saying that the method should update the document property fields in the document? This is how I understand it from the documentation.

Yes, you are right. I’ve logged the issue, please check back later.

OK, thank you.

Hi,

We have released Aspose.Word 3.2.

  • Fixed exception when updating results of some DOCPROPERTY fields.

https://docs.aspose.com/words/net/release-notes/

Now that is service.

One thing, when I go to the downloads page of the Aspose.Word componenent, it throws a
Index was outside the bounds of the array. exception.*

Sorry for any inconveniences, we are fixing the downloading problems.

The download system issues are fixed and Aspose.Word 3.2 is ready to download:

https://downloads.aspose.com/words/net