Automating dates and times in a Word document

Letting Word enter a date or time for users is easy, but that can lead to frustration when Word doesn't perform as expected. Teach users about the less obvious aspects of these features or give them a macro.
Word offers a couple of features for entering the current date and time, but they can confuse users. With just a little training, you can eliminate that confusion. Or you can provide a couple of macros that do exactly what your users need, without the confusion the built-in features sometimes cause. You can use the Date And Time command or AutoComplete to enter the current date or time anywhere in a document. First, let's take a look at the Date And Time command. Basically, you just choose Date And Time from the Insert menu, choose a format, and click OK. However, there are a few things you need to know:
  • If you want the date to automatically update, you must check the Update Automatically option in the Date And Time dialog box.
  • The Update Automatically setting is a toggle switch. Once you select it, it stays enabled until you deselect it -- and that can create confusion for users. They think they know what the setting is, so they don't check. Later, they're frustrated when the inserted value doesn't perform as expected.
  • The term automatically update is a bit deceptive. The inserted date will reflect the current date or time when you open the document. But if the date changes while the document is open, Word won't reflect that change. You can force the change by right-clicking the value and choosing Update Field from the context menu, but most users won't know that. Even if you tell them, they might not remember that detail when they need it.
A bit of spot-training can help, but unless this feature is something users rely on frequently, they are apt to forget all the above details. The other option is AutoComplete. You can enter the month or the current date and that alone confuses users. Again, just a bit of training can help:
  • Enter the first four letters of any month and press [Enter], and Word will complete the month. For instance, if you type Janu and press [Enter], Word will enter January for you.
  • To enter the current date, enter the full month, type a space, and press [Enter].
If AutoComplete doesn't work, someone has probably disabled the feature. To enable AutoComplete, choose AutoText from the Insert menu. Then, select AutoText and click the AutoText tab. Select the Show AutoComplete Suggestions option. If users know what to expect from both features, they're more apt to apply them correctly. Despite that, you might find users prefer a quick macro. The idea might seem like overkill -- but if a simple macro eliminates user confusion and mistakes, a macro is worth the effort. The following macros insert the current date and time, respectively. Sub DateStamp() 'Insert the current date. Selection.InsertDateTime "MMMM dd, yyyy", False End Sub Sub TimeStamp() 'Insert the current time. Selection.InsertDateTime "hh:mm", False End Sub You can change the format to suit your needs. The False value enters the date or time as a string. If you change that argument to True, Word will treat the inserted date or time as a field value. Add a couple of custom buttons for both macros and take all the guesswork out of entering the current date and time.


Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.

Deadly Ernest
Deadly Ernest

used extremely sparingly, especially in a work situation - such fields should ALWAYS be entered manually, even if the manual entry is just a case of clicking on the toolbar icon for 'Insert date' that you've added to your toolbar. because if you have it set to automatically insert the date, it will insert the date current at the time the document is opened, and if you are opening this to print a copy for legal reasons, the date will no longer correspond to the date of the previous printed copy. I've seen a court case lost because one side used the automatic insert date option, and they could NOT find any electronic copies that printed out with the correct original date without having to manipulate the file prior to printing, and thus the new print was not accepted by the court as an acceptable copy. If you add the Insert date icon to the toolbar and click on when you need to, it will just add the date current at the time of you clicking on the icon to the document, and that will then stay the same, until such time as you highlight that area and click on the icon again. A much preferable way of doing this.


It has always amazed me that MS did not incorporate the Ecxel and Access shortcuts of Ctrl ; and Ctrl: for current date and time respectively. I have written macros with those shortcuts for my version of Word.

Editor's Picks