![]() |
#15
|
||||
|
||||
![]() 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] |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
sedain121 | Mail Merge | 2 | 10-04-2011 07:52 PM |
![]() |
richard82 | Mail Merge | 1 | 07-07-2011 11:28 PM |
![]() |
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 |