Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Automatic date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TCC Barb - 14 Dec 2004 13:53 GMT
Office 2003
How can I get the correct date to appear when I type "date".
Jay Freedman - 14 Dec 2004 14:31 GMT
> 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. :-)

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

Peter - 14 Dec 2004 17:23 GMT
> > Office 2003
> > How can I get the correct date to appear when I type "date".
>
> Hi Barb,

[ 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
Jay Freedman - 15 Dec 2004 02:46 GMT
>> > Office 2003
>> > How can I get the correct date to appear when I type "date".
[quoted text clipped - 7 lines]
>
>-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...

--
Regards,
Jay Freedman
Microsoft Word MVP         FAQ: http://word.mvps.org

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.