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

by Allen Wyatt
(last updated January 27, 2017)

15

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-2012" but should look like "Sunday, 23 September 2012." 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 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 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 2012." Full information on how to put together the date patterns can be found at the Word MVP site, here:

http://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 and 2010. 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

Conditional Formats that Distinguish Blanks and Zeroes

Conditional formatting is a great tool. You may need to use this tool to tell the difference between cells that are empty or ...

Discover More

Controlling Entry Order on Unprotected Cells

When you protect a worksheet, one of the benefits is that you can limit which cells can be used for data entry. How a user ...

Discover More

Declaring Variables

Macros depend on the use of variables to do their work. This tip examines how variables are declared in a macro, using the ...

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)

Merging Formatted Data

Using the mail merge feature of Word, you can make data from Access databases accessible for your documents. How information ...

Discover More

Formatted Merging

When you use the mail-merge capabilities of Word, the information merged takes on the formatting of your source document, not ...

Discover More

Proper Comparisons for Dates in Merge Fields

How Word merges a data source with a document is controlled by merge fields. In those fields you may want to compare dates to ...

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 6 - 0?

2017-10-11 03:07:53

Ben

THANK YOU!


2017-08-24 03:47:23

Savvas

Important notice: Switches might not work with english character format in case of local langauge settings. For example in my case (Greek settings) I need to use "ηη/μμ/εεεε" switch which is the corresponding format in Greek.
It took me 1 hour to find it but it is important!!!


2017-02-04 11:03:05

paulus

thanks guys, it works a treat for me in word 2013


2017-01-05 20:43:06

Tim

This didn't work for me either. I've spent almost 2 hours trying to get dates from Excel to work in a Word merge. Sometimes Microsoft is very frustrating.


2016-11-15 08:42:21

vaux

Hi there,

my excel sheet where I want to import the information has a code - so when I do my usual switch date code IN WORD - it has no effect. I am using Word 2010 and spreadsheet is Excel 2010.

The code in the spreadsheet is =WORKDAY(BZ184,15)


2016-10-01 19:33:15

nick

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

Brilliant - thanks!


2016-07-19 04:45:35

penuel

good tips indeed


2016-04-21 10:24:07

Pam Jones

I have a question, what if you need to have a set date to expire 1 year from the date a letter is generated? So basically it puts today's date (if I generate today) - but 1 year later? Thanks


2016-02-18 12:19:28

Yvonne

Thanks good help but my problem is I have dates back in the 1800 and nothing I do brings them over as the date. They come over as a time 12:00:00 AM. No matter what date in the 1800's it is it comes over the same. Can you give me any help on that.


2015-10-02 09:58:08

Mg

It works excellent!!! Tnx!!!


2015-08-25 06:05:07

Alison

Sadly, the work arounds are NOT for Excel 2013.

Sad that Excel have to keep changing things to make them MORE difficult.


2015-06-09 16:34:23

Rachel

I'm having this problem as well, but your suggestion doesn't work. I'm thinking it has something to do with the fact that my field code looks slightly different right off the bat, even though I'm also using Word 2007. It uses "" around the field name, so it looks like this: { MERGEFIELD "Notice_Date" }

Therefore, I am not sure how to complete the format coding. I've tried it inside the existing "", with its own set of "", with spaces, and without. Nothing is working. Thanks for any help you can offer!!


2015-05-08 09:09:23

Tim.C

Thanks for this. It's crazy that MSFT makes the dates work like this, when you can have defaults for date fields entered in other ways!!

I also found that you can copy&paste your list from Excel into a Word table, then merge from the Word table and it keeps the formatting.

Probably simpler (if more crazy) than the 'correct' versions here.

;-)


2014-10-29 21:20:12

Priya

Thank you. I was nearly ready to pull my hair out till I read your tips :)


2014-05-10 09:20:31

Viswanath

Thanks this is the only place i had got the problem on Mail merge with date solved. all others giving only second part of the solution


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.