Insert Update CREATEDATE Field in Word Document using C# .NET to Get Date when DOCX was Created

We create word documents from templates. Does setting the builtInDocumentProperties.setCreatedTime() update the CREATEDATE of the newly created document?

When we look at the document statistics it shows the updated creation date (which is what we wanted). The problem we still have is that we can’t update the CREATEDATE fields within the newly created documents. The users have to update the fields manually (originally they still show the create date of the former template).

doc.updateFields() does not update the { CREATEDATE } fields within the created documents. The javadoc says that this method does not update all field types and that it updates only results of DOCPROPERTY and DOCVARIABLE fields. Shouldn’t this include the CREATEDATE field?

Many thanks for any hints!

Hi
Thanks for your request. No, UpdateFields does not update CREATEDATE field. However, You can use DOCPROPERTY field instead CREATEDATE. Here is field code:
{ DOCPROPERTY CreateTime * MERGEFORMAT }
Here is code:

Document doc = new Document(@"Test105\in.doc");
doc.BuiltInDocumentProperties.CreatedTime = new DateTime(2000, 12, 25);
doc.UpdateFields();
doc.Save(@"Test105\out.doc");

Also, see the attached document.
Hope this helps.
Best regards.