Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2017, 11:50 AM
MyerSL MyerSL is offline Directory Merge: unwanted condensing of key data Windows XP Directory Merge: unwanted condensing of key data Office 2010 64bit
Novice
Directory Merge: unwanted condensing of key data
 
Join Date: Jun 2017
Posts: 2
MyerSL is on a distinguished road
Default 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?
Attached Files
File Type: docx decision letter_public.docx (17.0 KB, 17 views)
Reply With Quote
  #2  
Old 06-06-2017, 01:15 AM
gmayor's Avatar
gmayor gmayor is offline Directory Merge: unwanted condensing of key data Windows 10 Directory Merge: unwanted condensing of key data Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Attached Files
File Type: docx decision letter_public.docx (14.7 KB, 12 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 06-06-2017, 07:53 AM
MyerSL MyerSL is offline Directory Merge: unwanted condensing of key data Windows XP Directory Merge: unwanted condensing of key data Office 2010 64bit
Novice
Directory Merge: unwanted condensing of key data
 
Join Date: Jun 2017
Posts: 2
MyerSL is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 06-07-2017, 02:41 AM
gmayor's Avatar
gmayor gmayor is offline Directory Merge: unwanted condensing of key data Windows 10 Directory Merge: unwanted condensing of key data Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #5  
Old 06-23-2017, 11:58 PM
macropod's Avatar
macropod macropod is online now Directory Merge: unwanted condensing of key data Windows 7 64bit Directory Merge: unwanted condensing of key data Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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 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]
Reply With Quote
  #6  
Old 04-21-2021, 09:23 PM
Bielo Bielo is offline Directory Merge: unwanted condensing of key data Windows 10 Directory Merge: unwanted condensing of key data Office 2010
Novice
 
Join Date: Apr 2021
Posts: 1
Bielo is on a distinguished road
Default

Quote:
Originally Posted by MyerSL View Post
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.
Hi, i had the same problem. I'm using Office 2010. I made a copy of the tamplate and the source data as an older versión of MS Office (*.doc and 8.*.xls) and pum! fixed for me. hope helped you.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Directory Merge: unwanted condensing of key data Condensing financial data H28Sailor Excel 13 04-02-2017 12:00 AM
Directory Merge: unwanted condensing of key data Mailmerge Directory - Incomplete Data Appearing in Merge Output Gwinnett Mail Merge 5 03-05-2017 02:24 PM
Directory Merge: unwanted condensing of key data Directory Mail Merge IslandAC Mail Merge 1 09-09-2016 04:53 PM
Directory Merge: unwanted condensing of key data Help with using catalog in Directory merge tarcher61 Mail Merge 15 03-30-2016 02:08 PM
Directory Merge: unwanted condensing of key data Word 2010 - directory mail merge - two separate group of data in one document htsu Mail Merge 2 03-07-2016 03:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:02 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