![]() |
|
#1
|
||||
|
||||
![]()
Did you read the section titled Using the Sample Data File & Mailmerge Main Document in the tutorial document?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
Absolutely. I guess I didn't get the fact that the code was actually in the tutorial. It was the "Viewing The Fields" section that I didn't grasp.
Been at this for a couple of days now. Just not getting it to do what I was hoping. From all the searching I have done, you appear to be the Guru. |
#3
|
|||
|
|||
![]()
I played with that simple example that uses the failing student/Teacher name example. Seems like that is the concept I need to follow but after trying numerous times, I could not get it to work. Something seems to be missing with the even paring of field code brackets. Or, I'm just an idiot.
|
#4
|
|||
|
|||
![]()
I can't find the code that keeps printing records on one letter until the Key changes.
I also need a better understanding of how/where template text gets folded in to the coding. |
#5
|
||||
|
||||
![]() Quote:
Quote:
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.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
![]()
OK. Thanks. I'll start playing with it again this morning. Just to make sure I understand, the "Repeated data" in the orange fields represents the multiple rows of data I have for each key?
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
JamesEddy | Word | 4 | 12-08-2014 08:16 AM |
Updating grouped ContentControls in Word 2010 | MGerhard | Word VBA | 3 | 08-04-2014 02:34 AM |
Directory MailMerge with Category Grouped Lists on Labels | screech | Mail Merge | 3 | 06-18-2014 11:41 PM |
![]() |
tombradley | Mail Merge | 1 | 09-29-2013 07:35 PM |
![]() |
kilosub | Mail Merge | 12 | 05-05-2011 12:27 AM |