Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Mail Merge

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-18-2017, 06:24 AM
Andrewwill Andrewwill is offline Mac OS X Office 2016 for Mac
Novice
 
Join Date: Sep 2017
Posts: 4
Andrewwill is on a distinguished road
Default Directory Mail Merge for Donations

Hello,
I am having a problem in doing the Directory Mail Merge in MS Word on Mac.
I know how to do the directory mail merge, but I can't figure out the exact code.


My excel sheet contains names of donors and their donations. each row contains the name of the donor, address, date received, donation. Donors' names are repetitive in different rows because it is one row per donation.

How can I list the donor and all his donations in one page? I want to group the donor with all his donations in one page.
Reply With Quote
  #2  
Old 09-18-2017, 01:57 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,331
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You can use Word's Catalogue/Directory Mailmerge facility for this (the terminology depends on the Word version). To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
http://windowssecrets.com/forums/sho...merge-Tutorial
or:
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.

the field coding for what you're trying to achieve is complex. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. For some worked examples, see the attachments to the posts at:
http://www.msofficeforums.com/mail-m...html#post23345
http://www.msofficeforums.com/mail-m...html#post30327
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 09-21-2017, 03:27 PM
Andrewwill Andrewwill is offline Mac OS X Office 2016 for Mac
Novice
 
Join Date: Sep 2017
Posts: 4
Andrewwill is on a distinguished road
Default

Thank you for your reply. I did fix the code and it's working. The only problem that I face is that I always get the error Error! Unknown op code for conditional.

This error shows after the first entry. Any thought?
Reply With Quote
  #4  
Old 09-21-2017, 04:29 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,331
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Evidently there's an error in your field coding of an IF field. Without seeing it, though, I can't be more specific.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 09-21-2017, 06:27 PM
Andrewwill Andrewwill is offline Mac OS X Office 2016 for Mac
Novice
 
Join Date: Sep 2017
Posts: 4
Andrewwill is on a distinguished road
Default

Below is the code. Thank you so much for your help!


{QUOTE{IF{MERGESEQ}=1 {SET Key ""} {SET LastKey {Key}}}{IF{MERGEFIELD donorname}<> {Key} "{IF{MERGESEQ}> 1"

Sincerely,
organization

{IF{MERGEFIELD donorname}<> 0 {QUOTE 12}}"}{IF{MERGEFIELD donorname }<> 0 "Dear {MERGEFIELD donorname}, {SET Key {MERGEFIELD donorname}}

Below is a list of all your donations for 2017.

"}"}"{IF{MERGEFIELD donorname}<> 0"{MERGEFIELD date}/{MERGEFIELD amount} {MERGEFIELD receivingperson}"}"}
Reply With Quote
  #6  
Old 09-21-2017, 06:41 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,331
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Aside from not needing {SET LastKey {Key}}, the only issues I see with your field code as posted is the lack of a space after:
{IF{MERGESEQ}=
and:
{IF{MERGESEQ}> 1
and the last:
{IF{MERGEFIELD donorname}<> 0
The first one is probably critical.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #7  
Old 09-21-2017, 06:55 PM
Andrewwill Andrewwill is offline Mac OS X Office 2016 for Mac
Novice
 
Join Date: Sep 2017
Posts: 4
Andrewwill is on a distinguished road
Default

Thank you! That did fix it.
Do you know how to add a total of the amount merge?
Reply With Quote
  #8  
Old 09-21-2017, 07:11 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,331
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

The tutorial includes a discussion of that, under Calculating Group and Sub-Group Totals, and the field coding required for it.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
mail merge, mail merge grouping, mail merge help
Please reply to this thread with any new information or opinions.

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Directory Mail Merge IslandAC Mail Merge 1 09-09-2016 04:53 PM
Directory Mail Merge Trouble Murph14 Mail Merge 5 06-03-2015 12:22 AM
table format after mail merge (directory) laboymc Mail Merge 0 03-16-2015 07:17 AM
Directory Mail Merge with table layout 3N1GM4 Mail Merge 11 06-03-2014 09:54 PM
Directory Mail Merge Issues dbpros_crm Mail Merge 10 01-20-2014 11:05 PM


All times are GMT -7. The time now is 04:37 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft