Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Microsoft Support > Microsoft Office support
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Microsoft Office support MS Office support forum

Reply
 
LinkBack Thread Tools
Old 11-07-2009, 12:07 AM   #1 (permalink)
Registered User
 
Join Date: Nov 2009
Posts: 4
OS: Vista


Mail Merge Data Corruption

Greetings,

Data being merged into word from an excel spreadsheet is getting corrupted.

This is for Office 2003 on XP. I have a spreadsheet with about 90 records of anywhere from 50 to 80 fields. I am using mail merge to fill in blanks in tables in a report (using "directory" as the document type so that I can get more than one record in sequence on the same page).

All of the cells in the spreadsheet are formatted as "text" (a mix of numbers, letters, serial numbers, etc.).

When I do the mail merge, everything works OK, except that several of the fields that are long numbers get corrupted with inserted garbage characters or other numbers. The numbers remain OK in the spreadsheet - they just show messed up in word: not all of them just the ones that seem to be pure numbers and longer than average (these are serial numbers, many of which are mix of numbers and letters, but some not).

This means that I have to spend extra hours or days fixing all of the problems, until I can figure out what is going wrong. I have not found any other mention of this as of yet. Does anyone know why this might be happening?
strannik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 11-08-2009, 02:57 AM   #2 (permalink)
TSF Enthusiast
 
Join Date: Apr 2008
Location: Australia
Posts: 559
OS: Vista


Re: Mail Merge Data Corruption

Hi strannik,

A couple of pointers:
1. Any field with a double-quote character will corrupt the output for that record, combining the data for that field with the data from subsequent fields.
2. If a column contains numbers with less than 16 digits in the first few rows, the mailmerge process will likely treat the data for that column as numeric. In that case, text may be lost and numbers with more than 15 digits may be corrupted beyond the 14th digit.
__________________
Cheers
macropod
(MS MVP -Word)
macropod is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 11-09-2009, 12:12 AM   #3 (permalink)
Registered User
 
Join Date: Nov 2009
Posts: 4
OS: Vista


Re: Mail Merge Data Corruption

I don't have double quotes.

I have all of the cells formatted as text (otherwise tool# 4-1 gets translated to April 1!) One field (serial numbers) are of greatly variable length and different combinations of number and letters. The data is what it is - I can't change it to fit word idiosyncrasies (anyone know if this has this been filed as a bug?). Is there any way to force the mail merge to read everything as text? Is there any other way to fix this? If I run the mail merge from access (with all fields defined as text) instead of excel will I have the same problem? Is there any better way to do this?

This is a nightmare - I can't believe the software is so screwy. Thanks for the pointers.

Quote:
Originally Posted by macropod View Post
Hi strannik,

A couple of pointers:
1. Any field with a double-quote character will corrupt the output for that record, combining the data for that field with the data from subsequent fields.
2. If a column contains numbers with less than 16 digits in the first few rows, the mailmerge process will likely treat the data for that column as numeric. In that case, text may be lost and numbers with more than 15 digits may be corrupted beyond the 14th digit.
strannik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 11-09-2009, 01:43 AM   #4 (permalink)
Registered User
 
Join Date: Nov 2009
Posts: 4
OS: Vista


Re: Mail Merge Data Corruption

OK, your pointers gave me ideas of where to search, and I came across this:
http://homepage.hispeed.ch/cindymeis...faq.htm#XLData

Quote:
When ODBC is used to make the link - and OLE DB uses Excel's ODBC driver, since Excel has no OLE DB provider of its own - the first eight rows are scanned in order to set the data type for the columns (fields). If a column contains mixed numerical and non-numerical values, the field contents are suppressed when they don't match the data type the ODBC driver has determined. This means, these fields are empty in the mail merge, and other problems (incorrect field values) result, as well.

Here, again, the best solution is to pass numerical data and dates as text.
So the next question is - is there a merge field formatting switch that will force the field to be read as text, without specifying a particular format or size (all number and letter combinations are different, just want them to be read as text only).

It still makes me wonder if it isn't easier just to import the spreadsheet into access and merge from that, but it looks like access has the same problem? or is it a word problem as well as excel?
strannik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 11-09-2009, 03:38 AM   #5 (permalink)
TSF Enthusiast
 
Join Date: Apr 2008
Location: Australia
Posts: 559
OS: Vista


Re: Mail Merge Data Corruption

Hi strannik,

There aren't any merfield switches to do what you're after. However, you could try using a DDE connection instead of OLEDB/ODBC.
__________________
Cheers
macropod
(MS MVP -Word)
macropod is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 11-09-2009, 06:26 PM   #6 (permalink)
Registered User
 
Join Date: Nov 2009
Posts: 4
OS: Vista


Re: Mail Merge Data Corruption

Macropod,

Thank you for all of your wonderful help! Not only did you identifiy the source of the problem, but the solution (DDE) worked well - I owe ya one!

Any idea whether the same problem exists when trying to do a merge
from access? I would think that they would have a better ODBC driver. Unless it is purely words fault?

Thanks again,

strannik
strannik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 11-09-2009, 11:31 PM   #7 (permalink)
TSF Enthusiast
 
Join Date: Apr 2008
Location: Australia
Posts: 559
OS: Vista


Re: Mail Merge Data Corruption

Hi strannik,

I believe the same issues exist with Access also. The underlying problem is that, using OLEDB/ODBC, the app running the query has to try to figure out what sort of data it's retrieving. As I understand it, the route MS chose (and it may be the industry standard) was to test the first 8 or so records to see what kind of content they have. Where you've got mixed data, this can, of course lead to the wrong result if those records aren't truly representative. A workaround would be to insert some dummy records (which you would then ignore for other purposes) to ensure the querying apps interpret the fields correctly.
__________________
Cheers
macropod
(MS MVP -Word)
macropod is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




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



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85