![]() |
|
|
|
#1
|
||||
|
||||
|
Hi bh,
Try the attached. Do note that, unless you separate the source file into two separate files - one for money and the other for goods/services - there is no practical way of having two separate mailmerges. I've altered the donations document slightly to account for this. Also, since I used Word 2003 for this, I had to sort the Excel workbook by donor so that the filtering would work correctly.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
I am very new to Mailmerge functionality, but really need to learn it. I have reviewed your examples and am confused as to the order of the coding. Why does what appears to be the bottom half of the output come first?
Any guidance would be very much appreciated. |
|
#3
|
||||
|
||||
|
Quote:
If you expand the field code for the 'Using One Key' example from page 9 of the tutorial, except for the colouring, you'll see: Code:
{QUOTE{IF{MERGESEQ}= 1 {SET Key ""} {SET LastKey {REF Key}}}{IF{MERGEFIELD State}<> {REF Key} "{IF{MERGESEQ}> 1 "↵
↵
If you require more details about the above sales figures, please contact your {REF LastKey} Sales Manager.↵
↵
Sincerely,↵
↵
↵
Customer Service Manager (National)↵
{DATE \@ "dddd, d MMMM yyyy"}↵
{IF{MERGEFIELD State}<> 0 {QUOTE 12}}"}{IF{MERGEFIELD State}<> 0 "Director,↵
Retail Sales {MERGEFIELD State}{SET Key {MERGEFIELD State}}↵
↵
These are the sales totals for {MERGEFIELD State \* Charformat}↵
↵
City Representative Sales↵
"}"}"{IF{MERGEFIELD State}<> 0 "{MERGEFIELD City} {MERGEFIELD Representative} {MERGEFIELD Sales \# $,0.00}↵
"}"}¶
• green content outputs whatever goes at the start of each letter. • orange content outputs the repeated data. • red content outputs whatever goes at the end of each letter (technically, {IF{MERGEFIELD State}<> 0 {QUOTE 12}} is part of that). • blue QUOTE field generates the page breaks between letters. • purple fields manage whatever you use as the KEY to indicate a change of grouping. • black content does the housekeeping, pulling all the others together and ensuring you don't get output being generated at the wrong time. Although the whole field is depicted as a single paragraph with manual line breaks, there is nothing to stop you having multiple paragraphs with a variety of formatting, images, textboxes, etc. for the green and/or red portions. Note: I've now closed this thread and moved later discussions to separate threads, as this thread was becoming quite long. If you need help with the issues discussed in this thread, please start a new one, linking to this one if necessary.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Saving INDV mail merges During the mail merge
|
sedain121 | Mail Merge | 2 | 10-04-2011 07:52 PM |
Mail merge with names in content
|
richard82 | Mail Merge | 1 | 07-07-2011 11:28 PM |
Selecting Names in New Mail Message
|
jackdashack | Outlook | 2 | 06-04-2011 04:19 PM |
| Duplicate Mail | wekhine | Outlook | 0 | 06-03-2010 09:08 PM |
| Convert Dollar amount to text | GeorgeLawshe | Word | 0 | 03-07-2010 10:17 PM |