#1
|
|||
|
|||
Directory Merge: unwanted condensing of key data
I am merging a directory of admissions decisions made on students from various high schools, following MacroPod's wonderful tutorial. I have everything working as desired, EXCEPT for random records it is condensing all into one. For example, schools A, B, C, and D all have their own page with the correct letter template (attached) and merged records. Then, out of the blue schools E and F are condensed (one letter listing students from BOTH schools--- merging in the address from only E and then throwing the students from F in at the bottom). It then gives G, H, and I their own separate pages but combines J, K, L, M, N. The data source quite clearly has the data changing for the key record in the schools where it's merging them (unwanted) so I'm not sure where I've gone wrong. The data source is alphabetized by the school address (to avoid errors thinking 2 schools with the same name are the same school) and then by student last name for ease of use. Do I need to remove the 2nd level of sorting and ONLY sort by school address? |
#2
|
||||
|
||||
Chances are that you don't have the data sorted by School.
This is a many to one mail merge. Modify the document as attached and download http://www.gmayor.com/ManyToOne.htm re-attach the data source and set the merge type as Letters. Sort the data by the School field. School is thus the Key field. The fields LastName, FirstName and Decision are the Child fields. You can then produce your letter in a variety of ways. If you want the contact field inserted as a hyperlink then see also http://www.gmayor.com/hyperlink_merge_fields.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Hi Graham, thanks for your response. I've done as you directed but I seem to be in an endless loop in the AddIn.
1) I never get to the "filter the data" pop-up (under "Running the Merge") - I see the disclaimer but then nothing else comes up. As such I can't follow the instructions because none of those pop-ups are appearing 2) I am told that I have more columns in the data source than merge fields and need to use the "clean worksheet" function but when I click that I get error "Run-time error '9': Subscript out of range". Thoughts? I appreciate your time and access to the addon but I imagine it isn't working for me like you've designed. |
#4
|
||||
|
||||
That doesn't sound good. I thought for one horrible moment that I had upset the filtering during some major updates recently, but I have tested again and that doesn't appear to be the case.
Click reset and when you start again the Default is not to use the filter. Use that default option. Just add the folder to save the documents. If it still doesn't work, send me your workbook to supportATgmayor.com, putting your forum username in the subject (or it will be discarded). By all means anonymize the data. I am not interested in your data, just the worksheet, so I can establish if there is a problem. If you are unable to do that, copy and paste only the used data range to a new Workbook, starting at Cell A1. Sort the data by the schools, then use that new workbook as your data source for the merge. There must be no empty fields in the schools column. Which Word version are you using? Incidentally did you try sorting the data and using your original merge document without recourse to the add-in?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
||||
|
||||
The most likely cause of the problem with the original field coding is that is unnecessarily nests some of the fields. Doing so may result in Word evaluating some of them mathematically. You also don't need the MERGEFORMAT switch. Thus:
{IF{ { MERGEFIELD School_address } }<> {REF Key \* MERGEFORMAT } "{IF{MERGESEQ}> 1 {QUOTE 12}"} { SET Key { { { MERGEFIELD School_address } } } } should only be: {IF{MERGEFIELD School_address}<> {REF Key} "{IF{MERGESEQ}> 1 {QUOTE 12}"} {SET Key {MERGEFIELD School_address}}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Quote:
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Condensing financial data | H28Sailor | Excel | 13 | 04-02-2017 12:00 AM |
Mailmerge Directory - Incomplete Data Appearing in Merge Output | Gwinnett | Mail Merge | 5 | 03-05-2017 02:24 PM |
Directory Mail Merge | IslandAC | Mail Merge | 1 | 09-09-2016 04:53 PM |
Help with using catalog in Directory merge | tarcher61 | Mail Merge | 15 | 03-30-2016 02:08 PM |
Word 2010 - directory mail merge - two separate group of data in one document | htsu | Mail Merge | 2 | 03-07-2016 03:10 PM |