Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-26-2012, 06:45 PM
macropod's Avatar
macropod macropod is offline Date picker mail merge error. Windows 7 64bit Date picker mail merge error. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

hi Dan,

There are two parts to this issue:
• the date format in Excel; and
• the date format in Word.

Word has a number of different methods of connecting to mail merge data sources, including DDE and OLE DB. Word 2002 and later use the OLE DB coonection by default, though you can change this (to DDE, for example). To work around a limitation in the OLE DB provider used to get data from Excel etc., when Word is connected to an OLE DB data source, it treats dates as if they are in the US mm/dd/yy format, regardless of the format in Excel, your regional settings etc. Applying a date format switch fixes that - and gives the mailmerge document the ability to format the date independently of whatever format is used in the data source.

To get the date format you want, you can add a formatting picture switch as follows:
• select the mergefield;
• press Shift-F9 to expose the field coding. It should look something like {MERGEFIELD MyDate} where 'MyDate' is your mergefield's name;
• delete anything appearing after the mergefield's name and add '\@ "d MMMM yyyy"' to the field, as in {MERGEFIELD MyDate \@ "d MMMM yyyy"}. With this switch your date will come out as '2 August 2008'. Other possible date formatting switches include:
. \@ "dddd, d MMMM yyyy";
. \@ "ddd, d MMMM yyyy";
. \@ "d MMM yyyy";
. \@ "dd/MMM/yyyy";
. \@ "d-MM-yy";
Note: Note: you can swap the d, M, y expressions around, but you must use uppercase 'M's for months - lowercase 'm's are for minutes.
• position the cursor anywhere in this field and press F9 to update it.

I assume that in Excel you're using the Calendar Control. If you use that, whatever date you pick should be inserted into your destination cell in that cell's format. If the day & month order for that format differs from your regional settings, that may cause problems for your mailmerge.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Date picker mail merge error. Date Picker Andy2011 Word VBA 4 11-24-2012 10:07 PM
Date picker mail merge error. word 2003 date picker nashville Word 16 04-06-2012 04:12 AM
Date picker trintukaz Excel 0 12-30-2011 12:42 AM
Calculations using values from date picker controls Inkarnate Word 0 06-09-2010 07:16 AM
Word 2007 date and time picker dmcohio Word 2 04-09-2010 04:13 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:03 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft