Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Automatically Determining a Due Date.

Automatically Determining a Due Date

by Allen Wyatt
(last updated January 30, 2016)

4

Sharen asked if there is a way to automatically calculate a due date in a letter that has its beginnings as the result of a mail merge. The easiest answer may be to examine the data source you are using for your mail merge and add an extra "due date" field to the source. For instance, if you are using an Excel worksheet as your source, you might add a field (column) that contains a date that is thirty days in the future. Likewise, if you are using Access as your data source you could do the same thing.

This approach would, of course, give you a static date that is thirty days in the future based on when you performed your mail merge. If you wanted something a bit more dynamic, then you are left to work entirely within Word. For instance, you might want to open the merged letter, update the letter's date, and have the due date automatically change based on changing the letter date. Unfortunately, there is no way to do this within Word, since there is no way to do calculations on dates within fields. This means that you must still manually update the due dates.

One way to make the task a bit easier, so that you don't have to always examine a calendar to figure out thirty days in the future, is to use a macro. The following is a very simple macro that will insert a date thirty days from now:

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, just by hitting the shortcut key.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10197) applies to Microsoft Word 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Word here: Automatically Determining a Due Date.

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

Automatically Formatting Graphics and Shapes

Want to change the graphics formatting defaults in Word? You can customize some of these defaults, saving yourself some time.

Discover More

Countering Compressed Columns

If you open a workbook and find that the width of some of your columns has been changed, the discovery can be ...

Discover More

Cropping Graphics in a Macro

Excel allows you to easily paste graphics into a worksheet. Once added, you may want to quickly process the graphics by ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Merging Graphics into Word Documents

Ever want to expand the mail merge feature to include graphics? Merging graphics into your document is easy but requires ...

Discover More

Getting Rid of Blank Labels in a Filtered Merge

If you are filtering a mail merge in Excel, and you get blank labels in the printout in Word, chances are good that ...

Discover More

Can't Place Merge Field in Header of a Catalog Merge Document

Word can perform several different types of mail merge operations, and the type you choose can affect how you are able to ...

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}] 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 one more than 2?

2017-02-15 09:16:25

Jay

Chris, I have been would be interested in that code. How can I contact you.


2016-02-09 05:52:34

Chris

I think what you're asking is for a box to appear that you can type your delay value into. As this is code that is part of a merge field, this isn't really necessary, although I suppose you could write a separate macro which includes a text box to add your delay value and have the macro update the field code, if that makes sense.


2016-02-08 21:42:19

Murray

Is there any way to require an input of the number of days delay, maybe with a default of 30days?


2016-02-02 10:04:44

Chris

There is a way to do this directly in Word. It is a very long, very convoluted piece of code, because you can't add 30 to a day - you'd end up with the 35th of <month>, which isn't ideal. There is a Word MVP called Macropod, and he created the code to do this directly in a mail merge document. I've used it and it works very well. As long as you check what you're doing, you can change the delay to be any number you want, and it will display the correct date. That way, it updates everytime the document is run. I have the code and can supply it if you're interested.


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips
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.