Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. 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: Controlling Date Formats in a Mail Merge.

Controlling Date Formats in a Mail Merge

Written by Allen Wyatt (last updated October 24, 2022)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


1

David is performing a mail merge using data stored in an Excel workbook. Part of the information being merged is a date. The date is formatted correctly in Excel, but when it is merged into the Word document it loses the formatting. Specifically, it appears as "09-23-2018" but should look like "Sunday, 23 September 2018." David is wondering how to get the formatting on the date that he needs.

There are two things you can try. First, you could check to see what method Word is using to grab the information from the Excel workbook. The default data transfer method is OLE (object linking and embedding), which means that the data is transferred as raw data and Word does it's best to format what it fetches. You can change the data transfer method when you select the Excel workbook in the merge process. Word should display a dialog box that asks how you want to have the data transferred; you should select either a DDE transfer or the Excel by Conversion option.

If you don't see the dialog box, then it means you need to configure Word so that it will present the dialog box. Just exit from the merge and follow these steps:

  1. Display the Word Options dialog box. (In Word 2007 click the Office button and then click Word Options. In Word 2010 or a later version display the File tab of the ribbon and then click Options.)
  2. Click Advanced at the left side of the dialog box.
  3. Scroll through the available options until you come to the General section. (See Figure 1.)
  4. Figure 1. The General section of the Advanced options of the Word Options dialog box.

  5. Make sure the Confirm File Format Conversion On Open check box is selected.
  6. Click on OK.

If all this talk about conversion methods, OLE, DDE, and the rest has your head spinning, take a moment and breathe deeply. You are in luck; there is another way you can get the date format you want without worrying about any method of data transfer. You can add a formatting switch to the merge field used in your document. If you display the field codes (instead of their results), the field usually looks similar to this:

{ mergefield MyDate }

This presumes that the name of the data field, from Excel, is MyDate. You can modify the merge field so that it includes a formatting switch, in this manner:

{ mergefield MyDate \@ "dddd, dd MMMM yyyy" }

The use of the \@ characters indicate that what follows is a pattern for how the date should be formatted. In this case, the date will show similar to "Wednesday, 26 September 2018." Full information on how to put together the date patterns can be found at the Word MVP site, here:

https://wordmvp.com/FAQs/TblsFldsFms/DateFields.htm

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

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

Default Picture Location

When you insert pictures into a document, the first folder that Word opens up is normally the My Pictures folder. You can ...

Discover More

Putting a Chart Legend On Its Own Page

Displaying information using charts in Excel is easy and there are a variety of chart styles to choose from. Integrated ...

Discover More

Disk Full Error

If you try to save your documents and you get an error indicating that the disk is full, it can be frustrating when you ...

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)

Checking Your Data File

When you get ready to merge a document with a data source, you'll want to make sure that everything is "as expected" ...

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

Discover More

Rounding in a Mail Merge

Word allows you to merge information into a document from various sources such as an Excel worksheet. If you do, you may ...

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 2 + 2?

2019-07-31 16:19:25

Les Abeyta

Hello. Thanks for this tip. I've tried the suggestions above but i am still having an issue.

I have a date i've formatted as a short date in my spreadsheet as 9/23/2014.

I've saved my spreadsheet.

I've opened my merge document and merged the specific field into my document. The date (formatted in the spreadsheet as 9/23/2014), comes into my document as 41905 (the unformated date).

I've edited the code to read MERGEFIELD Previous_Recorded_Doc_Date \@ "MM/dd/yyyy" however, i still get 41905.

This is happening randomly with SOME of my documents pulling the same merge field. It works in most but in some it does.

Any idea why?

thank you


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.

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.