Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Calculated Dates.
Written by Allen Wyatt (last updated January 6, 2024)
This tip applies to Word 97, 2000, 2002, and 2003
John asked if there is a quick way to put a calculated date into a letter created in Word. He wanted to send out mail-merged letters with a date that is 30 days after the date on which the letters were created.
Unfortunately, there is no native way to do this in Word. For instance, there is no field code you can use to insert a calculated date. If you are using Excel or Access as your data source for the mail merge, the simplest solution may be to just add a field in the data source that shows the calculated date. (It is very easy to do this in both Excel and Access.) The data source field can then be placed in the mail-merge document and everything is set.
If you want to stick with Word and cannot modify the data source (perhaps someone else supplies it), then you can use a macro to insert the future date. The following VBA macro will do the trick:
Sub FutureDate() Selection.TypeText Text:=Format(Date + 30, "mmmm d, yyyy") End Sub
This macro determines today's date, adds 30 days to it, formats it as specified in the format string ("mmmm d, yyyy") and inserts it into the document. If you assign this macro to a shortcut key, you can quickly insert your future date whenever you want.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (810) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Calculated Dates.
The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!
When processing text with a macro, you often need to remove extraneous spaces from the text. VBA provides three handy ...
Discover MoreWord collects a wide range of statistics about your documents, but one of the things it doesn't collect is how many times ...
Discover MoreGot a macro that processes or uses styles? You definitely need to know how many styles Word has available in the ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments