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

Changes to Toolbars aren't Persistent

If you make changes to a toolbar in Word, you expect those changes to be available the next time you start the program. ...

Discover More

Changing Measurement Units

When working in Word's dialog boxes, most people understand that you should enter measurements using inches. If you don't ...

Discover More

Incorrect Suggested Correction

As you type your document, Word flags words and phrases it thinks may be incorrect. The source of these various flaggings ...

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)

Determining if Overtype Mode is Active

Your macro may need to determine if the user has overtype mode turned on. You can find out the overtype status easily by ...

Discover More

Screen Flip Flop with VBA

Word allows users to conveniently work with multiple documents at the same time. When writing macros, you may need to ...

Discover More

Ignoring Smart Quotes when Comparing Text

When comparing two pieces of text, you may find that Word's smart quotes can mess up the comparison. Here's a quick way ...

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 six minus 4?

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.