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.

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:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

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.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Double-Spacing Your Document

Need to produce a quick double-spaced printout of your document? You can do it by using the simple steps in this tip.

Discover More

Changing the Comment Indicator Color

Add a comment to a worksheet, and you'll notice that Excel places a small, red triangle at the upper-right corner of the ...

Discover More

Reference Shortcut

Need to modify how a cell reference, in a formula, is constructed? The shortcut described in this tip will help you step ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (menu)

Deriving an Absolute Value

Want to know the absolute value of a number? It's easy to derive in VBA by using the Abs function.

Discover More

Determining Differences Between Dates

Do you need to do some simple math using dates in a your macro? One of the easy functions you can use is the DateDiff ...

Discover More

Understanding the For ... Next Structure

Spend any time creating Word macros, and sooner or later you will need to repeat some of your programming code a certain ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four less than 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

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.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.