Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2014, 02:46 AM
lmoir87 lmoir87 is offline Mail Merge Format random 0s Windows 7 64bit Mail Merge Format random 0s Office 2010 64bit
Novice
Mail Merge Format random 0s
 
Join Date: Jul 2014
Posts: 7
lmoir87 is on a distinguished road
Default Mail Merge Format random 0s

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
Reply With Quote
  #2  
Old 07-31-2014, 03:23 AM
macropod's Avatar
macropod macropod is offline Mail Merge Format random 0s Windows 7 32bit Mail Merge Format random 0s Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

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]
Reply With Quote
  #3  
Old 07-31-2014, 03:45 AM
lmoir87 lmoir87 is offline Mail Merge Format random 0s Windows 7 64bit Mail Merge Format random 0s Office 2010 64bit
Novice
Mail Merge Format random 0s
 
Join Date: Jul 2014
Posts: 7
lmoir87 is on a distinguished road
Default

Thanks Macropod

not sure what I did but seems to now be working
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Format random 0s Mail Merge is Deleting objects in my header and footer during the merge 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
Mail Merge Format random 0s Change Mail Merge Date Format from US to UK Evanaught Mail Merge 1 09-29-2013 08:02 PM
Mail Merge Format random 0s Issue with date format in mail merge document walshjod Mail Merge 4 11-28-2012 04:46 AM
Mail Merge Format random 0s Mail merge will not format date field generated by Excel IF statement borntorun75 Mail Merge 3 12-16-2011 06:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:04 AM.


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