#1
|
|||
|
|||
Mailmerge Directory - Incomplete Data Appearing in Merge Output
Hello,
I have successfully used the macros in Macropod’s excellent Catalogue/Mailmerge Directory Tutorial to create some very useful reports. Below is the merge code I used to merge text records by category for an FAQ report. I then use Macropod's TableJoiner macro on the output document to combine tables. I am using MS Word 2013. The merge and macro worked fine. However, I found that 4 cells from the Excel worksheet did not merge completely. Only partial content was merged into the Word table. See attached PDF. I suspected the data source because it was a file from Google Sheets. I have had difficulty merging Google spreadsheets in the past so I usually copy the data to a new worksheet in Excel. The client gave me a CSV file from Google Sheets, and I converted the file to XLSX in Excel. I have reformatted the spreadsheet, cleared all content/format from the problem cells, and re-entered cell content for those cells. The same cells will not merge properly. I am stumped. I am hoping someone can identify why this is happening. Cheers, |
#2
|
|||
|
|||
Hi!
This is because there is more than 255 characters in your field. When you use OLE DB connection to do you merging, you can't have more than 255 characters. Try using DDE connection. Good luck! Souriane |
#3
|
|||
|
|||
Thanks Souriane,
The lead was very helpful. I did a search and found a more detailed explanation and enabled the Confirm file format conversion on open check box (File > Options > Advanced> General) in MS Word. That did the trick. Now all the spreadsheet content appears in the merged table output. I found this explanation most helpful: https://goo.gl/7sqfuO. If others are having similar a similar problem, start with this link. Cheers, |
#4
|
||||
|
||||
Quote:
When Word establishes the OLE DB connection, it tests the first ~8 records in each field to determine the data type. If those records contain text but none is more than 255 characters, Word treats it as a text field; if any of the records contains more than 255 characters, Word treats it as a memo field. Accordingly, all you need do in this case is ensure the first record, for example, contains more than 255 characters. You don't need to revert to the ancient DDE connection method. This is all documented in the Mailmerge Tips & Tricks 'sticky' thread (https://www.msofficeforums.com/mail-...ps-tricks.html) at the top of this forum, under the heading Mailmerge Data Format Problems.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Thanks, Macropod, for the clarification.
I did a test of your suggestion and found that it worked well. The merge output contained all the text and none of the records in the groups were truncated. A couple of notes, 1. How to create a record that contains more than 255 characters? I used Word to create placeholder text (=Rand(1,4)) that ensured I would have sufficient text for the dummy record. See attached. 2. At first, I entered the dummy data in the first cell of the first column (Section) in the Excel sheet. That placement did not result in the proper output. I still had truncated cells in the output tables. I am guessing that is because my merge code uses Key 1 (Mergefield Section) to group the records. Because my merge code uses Col A header as my Key 1 (Section), the placeholder text was appearing in the Key 1 mergefield and Key 2 mergefield (Question). See thread above for the merge code that I used. 3. When I put the placeholder text in the Key 2 (Question) field, the merge output was correct. See attached. Inserting a dummy record in the first row of the Excel sheet is certainly easier than connecting to DDE files. Cheers, |
#6
|
||||
|
||||
Or, if it suits your situation, you might just re-organise your data so that a record with more than 255 characters occurs first.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
incomplete data, mailmerge, tables |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mailmerge Directory - TableJoiner Macro | Gwinnett | Mail Merge | 3 | 03-01-2017 09:25 AM |
Word 2010 - directory mail merge - two separate group of data in one document | htsu | Mail Merge | 2 | 03-07-2016 03:10 PM |
Directory MailMerge with Category Grouped Lists on Labels | screech | Mail Merge | 3 | 06-18-2014 11:41 PM |
Pictorial directory using mailmerge | JohnFinNC | Mail Merge | 6 | 10-04-2012 06:36 PM |
Directory Mailmerge | rohitjain80 | Mail Merge | 1 | 02-12-2012 03:42 AM |