Free Support Forum - aspose.com

Word to PDF: CREATEDATE not being updated

I have a word document that contains a { CREATEDATE } field that will automatically update the date as the document is opened. I perform a mail merge in the word document and then convert it to a PDF document. I noticed that the the date field is not being automatically updated in the PDF document.

Thanks

Hi,

Thank you for considering Aspose.

Can you please provide the Word document and let us test it?

Thanks for the quick reply. Attached is the document

Thanks for the document. We will test it and give you reply ASAP.

Aspose.Word does not automatically update fields on document open. You need to call Document.Range.UpdateFields if you want to update the fields, but at the moment it updates the results of DOCPROPERTY and DOCVARIABLE fields only. See the API reference http://www.aspose.com/Products/Aspose.Word/Api/Aspose.Word.Range.UpdateFields.html

We will implement update of other fields in the future.

However, I don't quite understand what sort of update you want for the CREATEDATE field as it is supposed to return the date the document was created and this date does not really change.

Ah, by the way, for your case there is a workaround, use the DOCVARIABLE field to insert the create date/time. In MS Word select Insert/Field, select DocVariable and select CreateTime.

Thanks for the update, sorry for the confusion, I thought the field was set to update the date to the current date each time the doc was open.

Thanks