#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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:
https://www.msofficeforums.com/mail-...-tutorial.html 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: https://www.msofficeforums.com/mail-...html#post23345 https://www.msofficeforums.com/mail-...html#post30327
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
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? |
#4
|
||||
|
||||
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 [Fmr MS MVP - Word] |
#5
|
|||
|
|||
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}"}"} |
#6
|
||||
|
||||
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 [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Thank you! That did fix it.
Do you know how to add a total of the amount merge? |
#8
|
||||
|
||||
The tutorial includes a discussion of that, under Calculating Group and Sub-Group Totals, and the field coding required for it.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
mail merge, mail merge grouping, mail merge help |
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 |