CREATEDATE not updating

I have a MS Word template that I have created for purchase orders.  It has a CREATEDATE field in it, and also an AutoOpen macro that prompts for some user input and assigns a sequential PO number.   The template has been working just the way it was supposed to for 6 months on several computers.  Now when it is run on any of the computers it doesn't update the date.  The last files created that actually worked correctly were all 7/8/2014 or earlier.  I have tried re-creating the field, and also tried using a "Activedocument.fields.update" in my macro, but can not get the date to update.  If I right click on the field and select update, it does change.  The only change that I can see that has been universal across all our computers are some MS Office automatic updates on 7/9/2014.  Any ideas?
Answer
Answer

You say you're using an an AutoOpen macro. That implies you're working with a document, not a template, since a template used for new documents would use either a Document_New macro or an AutoNew macro. The CREATEDATE field won't update on existing documents unless they're saved via SaveAs.

Unlike some other fields, the CREATEDATE field also doesn't auto-update automatically, even after a new document is created or an existing one is saved via Save As. You need to do something that would cause it to update (e.g. Ctrl-A, F9 for fields in the body or a Print Preview for other fields). Having Word's 'Update fields before printing' option checked is a good safeguard.

Furthermore, where the CREATEDATE field is in the document header or footer, your ActiveDocument.Fields.Update code won't affect it - but toggling the Print Preview will:

Application.ScreenUpdating = False
ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview
Application.ScreenUpdating = True

Cheers
Paul Edstein
(Fmr MS MVP - Word)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated January 20, 2022 Views 1,050 Applies to: