View Single Post
 
Old 03-02-2012, 06:38 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi daymaker,

I take it you're using the tutorials 'Using an Extra Field to Generate the Trailing Text Per Group' example as the basis for your mailmerge. If you select that example's field code and press Shift-F9, or if you just press Alt-F9 to expose all of the document's field coding, you should see:
Code:
{QUOTE{IF{MERGESEQ}= 1 {SET Key ""}}"{IF{MERGEFIELD State}<> {Key} "{IF{MERGESEQ}> 1 "{QUOTE 12}"}Director,
Retail Sales { MERGEFIELD State}
These are the sales figure for {MERGEFIELD State \* Charformat}{SET Key {MERGEFIELD State}}
City Representative Sales
"}{MERGEFIELD City} {MERGEFIELD Representative} {MERGEFIELD Sales}
{IF{MERGEFIELD State_Total}<> "" "
 The {MERGEFIELD State} total is: {MERGEFIELD State_Total}.
If you require more details about the above sales figures, please contact the {MERGEFIELD State} Sales Manager.
 
Sincerely,
 
Customer Service Manager (National)
{DATE \@ "dddd, d MMMM yyyy"}
"}"}
This is rather more extensive that what you appear to be using. The 'State' mergefield is the example's 'key' field. For your purposes, use the 'Customer' field. Similarly, where the tutorial uses 'State_Total', you'd use 'Total_Sales'. I'm sure you can figure the rest out.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote