Automatic date

J

Jay Freedman

TCC said:
Office 2003
How can I get the correct date to appear when I type "date".

Hi Barb,

You wouldn't want that to happen literally as you describe it. For example,
if you typed the sentence "George and I went out on a date", or maybe "I ate
a date and a fig", you'd be annoyed to find the word "date" changed to
"12/14/2004". :) You want Word to require some special signal before it
makes the replacement.

There are several ways to do it, depending on whether you want the date
inserted as plain text (so it will never change if you save the document and
reopen it on a different day) or you want it to update automatically to the
current date every time you look at it.

There's a Date and Time item on the Insert menu that can handle both
situations. If you want an automatically updating Date field, leave the
"Update automatically" box in the dialog checked. If you want plain,
non-updating text, uncheck the box. There's a keyboard shortcut for the
updating field, Alt+Shift+D. This information, plus instructions on changing
the formatting of the displayed date, is at
http://word.mvps.org/FAQs/TblsFldsFms/DateFields.htm.

If you like to do things the long way, you can create an AutoText entry
named "date" that contains a Date field, with or without special formatting
(see http://www.word.mvps.org/faqs/customization/AutoText.htm). To use the
entry, you type the word "date" and then press F3.

If you insert a field and then decide you don't want it to update any more,
you can click the field and press Ctrl+Shift+F9 to unlink the field -- that
turns it into plain text that will never update. Alternatively, you can
press Ctrl+F11 to lock the field, so it won't update until you unlock it
with Ctrl+Shift+F11.

There are even more elaborate methods, such as writing a macro to insert a
date in a specific format or to calculate a date in the past or in the
future. For the latter job, you can also use a rather bizarre field -- see
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902.

I'm sure that's more than you ever wanted to know. :)
 
P

Peter

Jay Freedman said:
[ snipped a deluge of information ]

hahahaha! That was more date information than I knew existed!
I got a kick out of that and just had to comment on it. I'll crawl back into my hole now. :)

-Peter
 
J

Jay Freedman

Jay Freedman said:
[ snipped a deluge of information ]

hahahaha! That was more date information than I knew existed!
I got a kick out of that and just had to comment on it. I'll crawl back into my hole now. :)

-Peter

The funny part is that -- despite this being a VBA newsgroup -- I
didn't get into any of the quirks of the Variant (Date) data type and
date manipulations in VBA. There's a large book chapter in there...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top