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

Unable to Format Cells

If you ever get to a situation where you can no longer format cells in a workbook, you'll realize just how important the ...

Discover More

Using List Box Controls

List boxes can be a great tool for getting input from users of your worksheets. This tip describes what list boxes are and ...

Discover More

Left and Right Aligned on One Line in a Label

If you need to put information on a label that has both left- and right-aligned information on the same line, it can be ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (ribbon)

E-mailing from a Mail Merge

Word has a great mail merge capability. Inherent in this capability is the option to send your merged documents via e-mail. ...

Discover More

Merging Only a Date from Access

When you are merging data from an Access database, you may get more information than you want, especially when it comes to ...

Discover More

Merging and Printing

When you merge information into a document, Word provides two different ways you can create your output. Here's an overview ...

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 eight minus 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.