Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Can I Use Mail Merge to Create a List Sorted by Category

Word Mail Merge

How Can I Use Mail Merge to Create a List Sorted by Category

by  AyJayEL  Posted    (Edited  )
How to Use Mail Merge to Create a List Sorted by Category

The key field to group on is called {Mergefield City}.
Table like this (Sorted by City)
CITY EMPLOYEE SALES
Bath Davies ú10,500
Bath Peterson ú2,000
London Smith ú3,000
London Jones ú20,000

{If{MergeSeq}="1" "{Mergefield City}
" ""}{Set Place1{Mergefield City}}
{If {Place2}<>{Place1}"
{Mergefield City}

{Mergefield employee}{Mergefield Sales}" "{Mergefield Employee}{Mergefield Sales}"}{Set Place2{Mergefield City}}

Will produce this
Bath

Davies ú10,500
Peterson ú2,000

London

Smith ú3,000
Jones ú20,000

There are more details on the Microsoft knowledgebase article How to Use Mail Merge to Create a List Sorted by Category. It also tells you how to force a new page after each group.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top