We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to set date of document creation

We are generating legal documents which must be stamped with the date/time of creation and this must be retained for admissibility.
Using the DATE field in MS Word does not work as it is updated when viewing the document. We have tried using the CREATEDATE field instead, however this records the date the template is created and not the date the document generated from the template was created.
I understand this could be addressed by a new date merge field which is populated with the system date/time, or programmatically inserted. Since this requirement is for a live system, I am looking to provide this functionality without changing the existing codebase and the need to test and deploy a release, by making use of the features within Aspose/MS Word.
Can you please advise if this is achievable or whether we will need to revert to a code change to provide this
Many thanks,

Hi David,

Thanks for your request. You can use { DOCPROPERTY CreateTime } field, but you should also update value of BuiltInDocumentProperties.CreatedTime:

Document doc = new Document(@"Test001\in.doc");
doc.BuiltInDocumentProperties.CreatedTime = DateTime.Now;

Hope this helps.
Best regards.

Hi Alexey
Thanks for your response which we will look in to. Do you know however whether it is possible to achieve this without any code
Many thanks

Hi David,

Thanks for your request. No, there is no way to achieve this without coding. You should anyways specify created date.
Best regards.