![]() |
#1
|
|||
|
|||
![]()
Hi
I'm trying to do a mail merge which pulls in text strings and numbers. I'm getting really confused as I am randomly getting zeros in some fields which shouldn't pull through and not in others. All the formatting is 'General' so I can't understand why it pulls some through and not others. Thanks |
#2
|
||||
|
||||
![]()
The mailmerge results have nothing to do with the Excel cell formatting. Rather, it has everything to do with the kinds of data in the columns.
By default, Word (2002 & later) uses the OLE DB provider to get merge data from an Excel workbook. The older ODBC driver works in a similar way. A limitation of the OLE DB provider is that it's designed to return data in a way that is compatible with Access and other relational database packages. Such databases require a specific data type for each field, and every value in that field must have only that data type. In Excel, however, cells in a column (field) can have different data types. When the OLE DB provider gets data from an Excel column with mixed data types, it has to determine the data type for each column. The first 8 records are used for that (the 8 can be changed in the Windows Registry, but it’s not advisable to do so). Records that don’t conform to the determined data type are liable to not be handled correctly. To complicate matters, for historical reasons, there are two text data types: "text" (up to 255 characters) and "memo" (can be longer than that). Some common mailmerge issues arising out of this include: • Numbers but not text or dates being output for some records (text and dates might be output as 0s); and • Text data being truncated at 255 characters. Ideally, one would ensure each field has only one data type. Workarounds include: • Inserting a dummy first record containing data in the format that is not being output correctly; or • Reordering the data so the first record has content in the format that is not otherwise being output correctly. Thus, if numbers appear but text and/or dates don’t, ensure the first record for that field has text or a date. Similarly, if text over 255 characters is being truncated, ensure the first record for that field contains more than 255 characters.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Thanks Macropod
not sure what I did but seems to now be working |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
bgranzow | Mail Merge | 9 | 06-05-2015 05:03 AM |
Mail merge how to link mail merge field value to a column heading | dsummers | Mail Merge | 1 | 05-08-2014 02:59 PM |
![]() |
Evanaught | Mail Merge | 1 | 09-29-2013 08:02 PM |
![]() |
walshjod | Mail Merge | 4 | 11-28-2012 04:46 AM |
![]() |
borntorun75 | Mail Merge | 3 | 12-16-2011 06:28 AM |