View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Help to setup mailmerge sort by category in word 2000

Another example would help!

If there is a 1-1 correspondence between Reportorder and Problemstatus and
by "12 categories" you mean there are 12 Reportorder values (and 12
equivalent Problemstatus values), then you need to test either Reportorser
or Problemstatus in the same way that the example tests/ City.

e.g.

{ IF { MERGESEQ } = "1" "{ MERGEFIELD Reportorder }" "" }ENTER
{ SET RO1 { MERGEFIELD City }}ENTER
{ If { RO2 } { RO1 }"ENTER
{ MERGEFIELD ReportOrder } { MERGEFIELD Problemstatus }ENTER
ENTER
{ MERGEFIELD ID }" }{ SET RO2 { MERGEFIELD City }}ENTER

However, you may need to alter the ENTERs to achieve the layout you need.

If there isn't a 1-1 correspondence between Reportorder and Problemstatus
and there can be several combinations of them, then you need to tell us a
bit more about your inputs and desired outputs. (Sorry, I will be away for a
few days...)

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Hell-fire" wrote in message
...
Hi,

Thanks to the link provided by Peter Jamieson, I saw a different way to
sort
my mail merge. Now the problem is, I really can't figure out the logic on
how to do this.

I have created a mail merge in a catelog format that pulls data from an
Access Query. There are 13 fields involved. Two fields are practically
the
same (Reportorder and Problemstatus), just one is a number the other is
the
description. The Query is setup to sort by Reportorder (ascending) and ID
(descending)

When I do the mail merge it sorts everything the way I want, but I don't
want to see the Problemstatus repeated for the same category. I would
like
the Problemstatus to show once followed by the ID's in that category, then
move on to the next category, etc.

For the Reportorder and Problemstatus, there are 12 categories. How would
one setup the mail merge field coding to do this? I hope I supplied
enough
detail, but if not, please let me know what else you would like. Thank
you
for anyone willing to tackle this problem of mine.