We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

update the value of the custom document property field

Thread ID:





77083 Oct 13,2008 10:05 AM UTC Nov 10,2008 11:17 AM UTC ASP.NET Web Forms (Classic) 3
Tags: DocIO
Administrator [Syncfusion]
Asked On October 13, 2008 10:05 AM UTC

I have added custom document properties to my doc like this:

document.CustomDocumentProperties.Add("CUSTOM_PROPERTY", "VALUE")

Then later, I append the field to paragraph:

paragraph.AppendField("CUSTOM_PROPERTY", FieldType.FieldDocProperty)

My question is, how to perform an "update field"? How do I get the appended field to print the actual value of custom property instead of the name. I can do it in Word by clicking the field with right mouse button and selecting "update field" from context menu.

Bhuvaneswari P [Syncfusion]
Replied On October 15, 2008 07:07 AM UTC

Hi Vesa,

Thank you for your interest in Syncfusion products.

The fields can't be updated by DocIO, it should be updated only after opened in MS word and by pressing F9 or select the fields and by giving update field. Since these fields values can''t be set during document creation. The fields are only updated after opened by MS word.

As a workaround please use create one macro like give below in any of your word document. This will automatically updates when ever any documents opened. The AutoOpen macro automatically runs when the document opens.

Sub AutoOpen()
Dim aStory As Range
Dim aField As Field
For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
Next aField
Next aStory
End Sub

Here is the link more about automatically updates fields


Please let me know if you have any questions.

Best Regards,

Administrator [Syncfusion]
Replied On October 15, 2008 08:57 AM UTC

Thank you for a quick reply. This was exactly the answer I needed and will work for me like a charm.

Bhuvaneswari P [Syncfusion]
Replied On November 10, 2008 11:17 AM UTC

Hi Vesa,

Thanks for the update.

Glad to know that it’s meets your requirement.

Best Regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon