Wednesday, April 1, 2009

Date's format when Mail Merging data from XL to Word

When you are mail merging dates from Excel to Word., the merge shows data in mm/dd/yy format irrespective of format you have in excel.

Here is the procedure to change the format of merged data in word:

Once finish the merge and put all the merge fields in, click on the date one you want to change so it is highlighted, then press Alt + F9 on the keyboard. This will display all the merge codes.

All you need to do is add some extra code to change the formatting.

Eg: your original table field is called 'Date', the merge field will currently be {MERGEFIELD "date"}

You need to add the following formatting data: \@"dd MMMM yyyy"

So your field will now look like this {MERGEFIELD "date" \@"dd MMMM yyyy"}

Press Alt + F9 again to revert to the field name view, then click onto the next step. You'll see your dates are now formatted in the long date format.