|
|
ABC ~ All
'Bout Computers
The Online Web-azine for Computer
Enthusiasts
-- brought to you by

contents page for this issue |
|
How Do I
Insert a Date in Word?
Why does
it (not) change when I re-open the document?
New
this month! - Word Shortcuts. Although I
was a Mac user for years, I still have a strong preference for keyboard
shortcuts and function keys. You can't use them, though, if you don't know
them. I will try to give you a few each month. This month's are associated
with today's topic; in the future they may be unrelated. First, though,
let's look at how to make a date with Word.
The
easy (but probably wrong) way to put a date in your document is
Alt-Shift-D or
Insert => Date.
If you
don't check "Update Automatically" this is the same as typing
the date yourself (except harder). If you do check "Update
Automatically" it will update when you print (if you have the setting
under printer options as "Update Fields" which is the default).
Alt-Shift-D just inserts this DATE field for you. Unfortunately, it is the
wrong field, at least for me. The field inserted on my computer with
Alt-Shift-D is:
{ DATE
\@ "MM/dd/yyyy" }
which
looks like
09/11/2001
in a
document. The exact layout of this default will depend on your language
settings in Word as well as on your keyboard and international settings in
Windows or on the Mac. I use it so seldom that I'm not even sure where to
go to change it. (The "\@ 'MM/dd/yyyy'" is a formatting picture
and we'll look at what it means later.) When I said that it is the wrong
field, I was talking about the DATE part. You see, that field is sort of
like a clock, when updated, it tells you what the date is, now. I prefer
to use a calendar for that purpose, thank you.
If you
want to see this field press Alt-Shift-D and then put your insertion point
inside of the date. Press the Shift-F9 key combination and the field will
show up in place of the date.
You can
manually force an update by putting your insertion point in the date and
pressing the [F9] key. I dislike this "today" date so much that
I removed the Insert ==> Date from my Insert Menu altogether!
If you
want to put a date in a template that updates to the current date when a
document is created based on the template, or want to change the format or
do other things with the date field, you want to use Insert --> Field
--> Date and Time instead. Using the options here, you can either pick
a format or type your own characters (called a picture) for the format.
The options for the type of date include:
{
DATE } - The date you are looking at the document. Always today
(although it may not show on screen as today until you update the
field).
{
CREATEDATE } - The date the document was created (or saved using Save
As).
{
PRINTDATE } - The date the document was last printed.
{
SAVEDATE } - The date the document was last saved.
The
above are the field codes that will be inserted for you using Insert Field
Date and Time without using any options. If you choose options, they can
include the following pictures:
Picture
|
Displayed
Date
|
|
\@
"MMMM d, yyyy"
|
August
1, 2001
|
|
\@
"MMM dd, yyyy"
|
Aug
01, 2001
|
|
\@
"MM/dd/yy"
|
08/01/01
|
|
\@
"dddd, MMMM d"
|
Tuesday,
August 1
|
|
\@
"ddd, MMM. d, yyyy"
|
Tue.,
Aug. 1, 2001
|
|
\@
"MM/dd/yy hh:mm:ss am/pm"
|
08/01/01
10:36:12 PM
|
|
\@
"d" \* ordinal
|
1st
|
example:
{ CREATEDATE \@ "MMM dd, yyyy" } = Aug 01, 2001
If you
don't like the pictures you are offered, pick the one that is closest to
what you want and then modify it in the Insert Field dialog box (or in the
codes themselves using Toggle Field Codes). Remember, though, that these
particular codes can be Case-Sensitive. With "MM" you will get a
two-digit month, with "mm" you will get two-digit minutes.
You can
also break a date into multiple fields. This can be done to use special
formatting or if you use the F11 key (next field) for manually editing.
Example of the former reason:
{
CREATEDATE \@ "dddd" }, the { CREATEDATE \@ "d"
\*ordinal } day of { CREATEDATE \@ "MMMM" } in the year { CREATEDATE
\@ "yyyy" } = Tuesday, the 1st day of August in the year 2001.
Remember
that fields in headers and footers don't get updated quite as predictably.
They work fine with CREATEDATE but can have the same problem as page
numbers (see that
topic) with DATE.
For
more on "pictures" and formatting dates see: Fields
Switches. For more on fields, follow the links on my Word
Web Resources page.
If you
want a menu that gives you different kinds of date
fields that can be inserted into documents, download the LegalToolbars
from http://www.addbalance.com/word/download/.
This is a self-documenting global template and includes the following
fields in different formats on a menu that can be used without the rest of
the legal toolbar:
It
is also possible to use VBA or complex field codes to have date
fields that give you a date two weeks from now. That is way beyond
the scope of this column, though. If you have a need for such,
please take a look at Calculated
Dates in Word.
Date and Field Keys
|
Windows Keys |
What
|
Macintosh Keys |
|
F9 |
Update/Refresh Selected
Field |
F9 |
|
Shift-F9 |
Display/Hide Field Codes
(selected field) * |
Shift-F9 |
|
Alt-F9 |
Display/Hide All Field
Codes (all fields in document) ** |
Opt-F9 |
|
Ctrl-F9 |
Create Empty Field
(Insert { }Braces) |
Cmd-F9 |
Ctrl-Shift-F9
or
Ctrl-6 |
Unlink Selected Field (delete
all field coding and replace with field result) - turn field
into text |
Cmd-Shift-F9 |
|
F11 |
Go to (Select) Next Field |
F11 |
|
Shift-F11 |
Go to (Select) Previous Field |
Shift-F11 |
Ctrl-F11
or
Ctrl-3 |
Lock Field (prevent
manual or automatic update) |
Cmd-F11
or
Cmd-3 |
Ctrl-Shift-F11
or
Ctrl-4 |
Unlock Field (allow
updating) |
Cmd-Shift-F11
or
Cmd-4 |
|
Alt-I, F |
Insert Field (Dialog Box)
(Alt-I followed by F) |
Opt-I,F |
| Alt-Shift-D |
Insert Date Field *** |
Ctrl-Shift-D |
*
It is possible to have fields inside of fields (nested fields). If this is
the case, the Shift-F9 Toggle will not show all the field codes, only the
outermost layer. To see all the field codes, use Alt-F9 instead.
**
Alt-F9 is the same as checking / unchecking Field Codes in Tools =>
Options => View. Unlike a field code toggled using Shift-F9, if you
update a field while all field codes are being displayed, the new field
result will still be hidden and you will see the field codes.
***
Probably not the field you want to insert, though.
For
more about fields, see the links list on my Word
Web Resources Page under fields.
If you
want to try getting the keyboard shortcuts all at once, you can take a
look at the Microsoft Knowledge Base for Word
97, Word
98, or Word
2000. You can also print the keyboard shortcuts on your computer
(including your custom keyboard shortcuts) by picking keyboard commands on
the Print dialog box under Print What? (instead of document).
| |