Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and 2021. 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 2021


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

Sorting Tabular Tables

Some people like to format simple tables using tabs instead of using Word's table editor. When it comes time to sort such ...

Discover More

Removing Personal Information

As you create and work on your workbooks, Excel can include sensitive personal information with the data. If you want to ...

Discover More

References to Hyperlinks aren't Hyperlinks

Make a reference to a hyperlink in a formula, and you may be surprised that the reference doesn't return an active ...

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)

Getting Rid of Spaces in Merged Data

When you merge information with a Word document, you may not be completely satisfied with the appearance of some of the ...

Discover More

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

Maintaining Leading Zeroes

When merging ZIP Codes from a data source such as Excel, you might find that Word ends up dropping out leading zeroes in ...

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 nine more than 7?

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.