Hi Frank,
I think what's happening here is that any combination of just month and
year, with a year number of 12 or less, is ambiguous. Try typing Dec-05
into an EXCEL cell, with this number format. I get Dec-06, the same thing
you're describing with Word.
This is one reason why Graham asked which connection protocol you're
using for the mail merge. An SQL string is not a connection, just a
filter :-) Possible connection protocols would be: OLE DB, ODBC, DDE or
the spreadsheet converter.
> Well, I played around some more, and the error seems to reproduce only
> when certain date formats are used in Excel. I've not done an
[quoted text clipped - 18 lines]
> information. If not, I'd be happy to upload the word and excel files
> somewhere for folks to test.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
Frank Santoro - 10 Jan 2006 17:05 GMT
Well, the data as typed in excel was "12/01/2005". When I had the
excel cell formatted as mmm-yy (i.e., displaying Dec-05), I got the
error in Word (i.e., the merge field with switches displayed "December
2006"). When I changed the format in the excel cell to mm/dd/yyyy,
there merged data in Word displayed "December 2005".
Now as to connection protocol, I have no idea what you mean. How do I
find out? All I know is I am using the word merge function.
Cindy M -WordMVP- - 11 Jan 2006 10:22 GMT
Hi Frank,
> Well, the data as typed in excel was "12/01/2005". When I had the
> excel cell formatted as mmm-yy (i.e., displaying Dec-05), I got the
[quoted text clipped - 4 lines]
> Now as to connection protocol, I have no idea what you mean. How do I
> find out? All I know is I am using the word merge function.
OK, if you didn't choose anything, and this is Word 2003, then the
connection method is OLE DB (unless this document + the connection to
the data source originated in an earlier version of Word?). Can you see
this if you start with a new document and
1. Tools/Options/General, activate "Confirm conversions on open"
2. Connect to the worksheet.
3. You'll get a dialog box with a list of connection methods. Which one
is selected by default? Go through and test with each, keeping a record
of the result you get in each case. (For ODBC you'll probably need to
click "Options" and activate "System tables" in order to get a list of
worksheet names) What kinds of results do you get?
Do you see this only with Dec. 1? Or does it also happen with any other
day (up to and including 12)?
You see, Excel saves date information as long integers (number of days
since Dec. 31, 1901 or something like that). Most Office applications
know how to take these integers and display them as dates, using the
formatting pictures. But the applications can get confused if you start
with an ambiguous date (12-05, both numbers could be day, month or
year). In such a case, they'll tend to say OK, this is the day and
month, I'll just hang the current year on it. This appears to be what
you're seeing, but I have to know exactly what circumstances in order to
test on my installation.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)