Every Friday Ned produces a report that gets distributed in his company. He would like the heading of the report to always have the previous Monday's date in it. He wonders how he can have it dynamically display the date for the Monday of the current week.
If Ned were producing the report in Excel, calculating the past Monday's date would be very easy. This isn't Excel, however; the report is in Word. So the task is nowhere near as easy. There are a few of approaches you can take, however.
One approach is to actually create the Word document for your report on Monday. You don't have to put anything into the report; just create the document that will be used at the end of the week to create the report. You can then include a field in the header that inserts the date the document was created (the CreateDate field). It will always reflect the Monday on which the document was created.
If that doesn't fit your needs (perhaps you can't, for some reason, create the document on the Monday), you can try to create a date using a nested field. The following is a possibility:
{ date \@ "MMMM { ={date \@"dd"} -5} yyyy"}
Remember that each pair of field braces needs to be entered by using Ctrl+F9. The compound field will work for many dates, but will run into problems if the Friday on which you calculate the field is within the first five days of the month. (The calculation in the inner field will return a negative value on those days.) There is no easy way around this problem.
The easiest approach is to use a macro to insert the date. Macros can do date calculations quite easily. Here is an example of a quick little macro that can calculate the proper date:
Sub MondayBeforeToday() Subtract = Choose(Weekday(Date), 6, 7, 1, 2, 3, 4, 5) DateFormat = "dddd mm/dd/yyyy" Selection.InsertBefore Format((Date - Subtract), DateFormat) End Sub
All you need to do is to position the insertion point where you want the date and then run the macro. It can be run on any day of the week and it will always insert the date of the previous Monday.
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 (9801) 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: Monday's Date on Friday's Report.
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!
A field can be locked or unlocked, and its condition controls whether it is updated automatically or not. If you want to ...
Discover MoreWord allows you to convert documents from WordPerfect format to Word. In doing so, you may notice that some dates in the ...
Discover MoreFields are a powerful way to add dynamic content to your documents. Some fields rely on the use of parameters to control ...
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 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.
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 © 2022 Sharon Parq Associates, Inc.
Comments