Word 2010: Custom Date With Auto Month/Year, Blank Day

March 30, 2013 at 1:11 pm

A member of the Windows 7 / Microsoft Office for Legal group on LinkedIn recently asked if there is a way to create a date code in which the month and year are codes that automatically update but there is a blank line where the user can type the day of the month manually.

My original method involved substituting some underscore characters for the “d” (the code for the day of the month) in the date code.  This method worked fine, except that if the codes in the document were updated after the user had typed the day of the month, the manually typed day was erased and replaced by the underscore characters.

The method I detail in this post has the advantage that the underscore characters aren’t part of the field code at all.  Rather, they are plain text.  So the user can type over them and when the document field codes are updated, only the month and the year will update.

After setting up the date in this format (with an automatically updating code for the month, followed by underscores in plain text, followed by another automatically updating code for the year), you can create a Quick Part so that you can insert this specially formatted date into your document with just a few keystrokes.

First, let’s create the custom date.

  1. Insert a date code by doing one of the following:

> Clicking the Insert tab, Text group, Date & Time (choose the date format you want and make sure that “Update Automatically” is checked); or

> Pressing Alt Shift D (but note that this method might insert the date in a format not to your liking).

  1. Press Alt F9 to display the field code itself, not the code results.  The code should look like this:

{ DATE \@ “MMMM d, yyyy”}

  1. Press the spacebar, type a few underscore characters and a comma, and press the spacebar again.
  1. Then insert a second date code.  You should see something like this:

{ DATE \@ “MMMM d, yyyy”} _____,  { DATE \@ “MMMM d, yyyy”}

  1. Insert your cursor into the first date code and delete everything after MMMM except the close quotation marks and the close bracket.  The result should look like this:

{ DATE \@ “MMMM”}

  1. Insert your cursor into the second date code and delete everything between the open quotes and yyyy.  The result should look like this:

{ DATE \@ “yyyy”}

  1. Press Alt F9 again to display the code results, i.e., the date.  You should see something like this:

March _____, 2013

When you click in the month or the year, it should appear in gray, indicating that it is a code.

Now set up a Quick Part (Building Block) so that you can insert your modified date code with a few keystrokes.  To do so:

  1. Select (highlight) the entire date, from the month through the year.  In other words, include both date codes and the plain text in between.
  1. With the date selected, press Alt F3, and when the Create New Building Block dialog opens, give the entry a name (such as Month & Year).
  1. Optional Step:  Type a description if you wish – something that might help you identify the Quick Part in the Building Blocks Organizer later on.
  1. Click OK to save your new Quick Part.
  1. To expand the Quick Part, start typing the name you gave it and press F3, which is the expander key.

CAUTION: When exiting out of Word, you will be prompted to save your new Quick Part. Be sure to click “Yes” or “OK” (I can’t recall the exact wording of the prompt), or the Quick Part will not be saved when you close out of Word!

Advertisements

Entry filed under: Uncategorized.

Best wishes for 2013! Revised post about macro to invoke the old Print dialog


© Jan Berinstein 2009-present. Unauthorized use and/or duplication of one or more articles posted on this blog -- i.e., without express written permission from the blog’s author -- is strictly prohibited. You may use brief excerpts and/or links, provided that you give full, accurate, and prominent credit to Jan Berinstein, with appropriate and specific direction to the original content.

Inspired By My Trainees

Some trainers teach at the speed of light. I prefer to teach at the speed of enlightenment.

Knowledge is empowering. Pass it on!

Buy my Word 2016, Word 2010, or Word 2007 book

To buy my book, Formatting Legal Documents With Microsoft Word 2016, on Amazon.com, click this link .

There is no preview of the Word 2016 book on Amazon, but you can see / download the Table of Contents by clicking this link to the TOC.

To buy my book, Formatting Legal Documents With Microsoft Word 2010, on Amazon.com, click this link .

There is no preview of the Word 2010 book on Amazon. However, you can see a preview - or buy a slightly older version of the book - on Lulu.com by clicking the gray "Buy Now - Lulu" button.
Support
independent publishing: Buy this book on Lulu.

To buy my first book, Formatting Legal Documents With Microsoft Office Word 2007 on Amazon.com, click this link. There is no preview of the Word 2007 book on Amazon. However, you can see a preview - or buy a slightly older version of the book - on Lulu.com by clicking the blue "Buy Now - Lulu" button.
Support independent publishing: buy this book on Lulu.

One good tip deserves another

Have you learned something useful from these tips? If so, please express your appreciation (and help keep the blog going) by contributing $5.00, $10.00, or more. It's easy!

Many thanks for your support!

NOTE: Your donation is not tax-deductible (but it does support a worthy cause!).


%d bloggers like this: