Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-24-2020, 10:13 AM
kathleen.lehnigk kathleen.lehnigk is offline Help with 2nd grouping - mail merge directory Windows 10 Help with 2nd grouping - mail merge directory Office 2019
Novice
Help with 2nd grouping - mail merge directory
 
Join Date: Nov 2020
Posts: 4
kathleen.lehnigk is on a distinguished road
Default Help with 2nd grouping - mail merge directory

Hi all,



I posted this question also into the Microsoft Community (Help with 2nd grouping - mail merge directory - Microsoft Community), but was recommended to post it here too.

We're currently trying to re-create a weekly email as a Word mail merge directory to save time, as it currently is done with manual updates.

The output should be like the following:
to be.png

I've used code posted online and amended it and can get it to work to work like the following - showing the region value again after each new school:
current result.png

How can I amend the below code to also group by the Region, so that the Regions also don't appear as duplicate values?
code.png


Thanks a lot in advance for looking into this.
Best wishes
Kathleen
Reply With Quote
  #2  
Old 11-24-2020, 03:12 PM
macropod's Avatar
macropod macropod is offline Help with 2nd grouping - mail merge directory Windows 10 Help with 2nd grouping - mail merge directory Office 2010
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

Without actually seeing the problem document and some sample data, it can be difficult for anyone to diagnose the issue. Can you attach a document plus to a post with some representative data (delete/anonymize anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-25-2020, 02:12 AM
kathleen.lehnigk kathleen.lehnigk is offline Help with 2nd grouping - mail merge directory Windows 10 Help with 2nd grouping - mail merge directory Office 2019
Novice
Help with 2nd grouping - mail merge directory
 
Join Date: Nov 2020
Posts: 4
kathleen.lehnigk is on a distinguished road
Default RE: Help with 2nd grouping - mail merge directory

Hi Paul,

Thanks a lot for your reply.

Please find here the word template with the code for the directory:
template - directory mail merge.docx

Here an example list of job postings used in the above template:
Job listings - examples.xlsx

And an example of the current Output, where I've highlighted the duplicate Regions in yellow:
Mail merge directory Output - example.docx

Hope, this helps.

Thank you
Best wishes
Kathleen
Reply With Quote
  #4  
Old 11-25-2020, 03:04 AM
macropod's Avatar
macropod macropod is offline Help with 2nd grouping - mail merge directory Windows 10 Help with 2nd grouping - mail merge directory Office 2010
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

Try the attached. TI've edited the field code and added a macro to the mailmerge main document so that the hyperlinks can be automatically restored in the output document.
Attached Files
File Type: docm MailMerge Main Document.docm (23.8 KB, 9 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 11-25-2020, 04:24 AM
kathleen.lehnigk kathleen.lehnigk is offline Help with 2nd grouping - mail merge directory Windows 10 Help with 2nd grouping - mail merge directory Office 2019
Novice
Help with 2nd grouping - mail merge directory
 
Join Date: Nov 2020
Posts: 4
kathleen.lehnigk is on a distinguished road
Default

Thanks so much for your quick reply on this, Paul. Much appreciated

The hyperlinks in my initial document are surviving for me they are just not visually displayed with the blue colour. But thanks for showing me also an alternative way of producing these.

I've tested your version, but each job now appears on a new page and the Region is still displayed multiple times whenever there is a new school.

Thanks
Kathleen
Reply With Quote
  #6  
Old 11-25-2020, 12:58 PM
macropod's Avatar
macropod macropod is offline Help with 2nd grouping - mail merge directory Windows 10 Help with 2nd grouping - mail merge directory Office 2010
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

Quote:
Originally Posted by kathleen.lehnigk View Post
I've tested your version, but each job now appears on a new page and the Region is still displayed multiple times whenever there is a new school.
That's because you haven't configured the mailmerge main document for a Directory merge.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 11-26-2020, 12:52 AM
kathleen.lehnigk kathleen.lehnigk is offline Help with 2nd grouping - mail merge directory Windows 10 Help with 2nd grouping - mail merge directory Office 2019
Novice
Help with 2nd grouping - mail merge directory
 
Join Date: Nov 2020
Posts: 4
kathleen.lehnigk is on a distinguished road
Default

Oh yes, I aplogise. That moved them all to one page.

You are brilliant, Paul

Your code worked perfectly, just added some line spaces, where necessary. Here my final version of your example: Mail merge template - amended version Paul.docm

Your code also helped me modifying my version as my colleague did not want to have the hyperlinks shown with the hyperlink colour. So, here my version, which does not require a macro: Mail merge template - jobs.docx

Thanks sooo much for your help. Really appreciated and I owe you one :-).

Best wishes
Kathleen
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with 2nd grouping - mail merge directory Mail Merge Grouping Catherine.DeMayo Mail Merge 2 09-30-2019 09:39 PM
Total formula for mail merge grouping jackmp3 Mail Merge 3 10-22-2018 12:40 PM
Help with 2nd grouping - mail merge directory Mail Merge Grouping Multiple Records into 1 Output DeniseStafiej Mail Merge 1 08-03-2018 03:41 PM
Help with 2nd grouping - mail merge directory mail merge multiple rows within a grouping tracygleghorn Mail Merge 12 11-12-2015 06:43 AM
Help with 2nd grouping - mail merge directory Grouping list in Mail Merge AlexTeslin Mail Merge 1 03-08-2013 09:31 PM

Other Forums: Access Forums

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