Mailmerge to create a list sorted by category not working

S

Simon J

Hi,

Can anyone help on why I get seperate pages out when i try to perform
the following?


{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}}

This is from the Microsoft Support site Article ID: 211303.

I assume that I should get two lists headed up if i work through the
example.


Many thanks in advance

Simon
 
M

macropod

Hi Simon,

The example in the KB article does work if it's input correctly and the field names match those in your source file. Did you use
Ctrl-F9 to create the field brace pairs (ie '{ }')?

Also, if you're using an Excel data source, the example in the KB article inserts an extra line between records. The following
(simpler) field code construction doesn't:
{QUOTE{IF{MERGESEQ}= 1 {SET Place ""}}"{IF{MERGEFIELD City}<> {Place} "{IF{MERGESEQ}= 1 "" "<ENTER>
"}{MERGEFIELD City}{SET Place {MERGEFIELD City}}<ENTER>
<ENTER>
"}{MERGEFIELD Employee}<TAB>{MERGEFIELD Sales}<ENTER>
"}<ENTER>
 
S

Simon J

Hi Simon,

The example in the KB article does work if it's input correctly and the field names match those in your source file. Did you use
Ctrl-F9 to create the field brace pairs (ie '{ }')?

Also, if you're using an Excel data source, the example in the KB articleinserts an extra line between records. The following
(simpler) field code construction doesn't:
{QUOTE{IF{MERGESEQ}= 1 {SET Place ""}}"{IF{MERGEFIELD City}<> {Place} "{IF{MERGESEQ}= 1 "" "<ENTER>
"}{MERGEFIELD City}{SET Place {MERGEFIELD City}}<ENTER>
<ENTER>
"}{MERGEFIELD Employee}<TAB>{MERGEFIELD Sales}<ENTER>
"}<ENTER>

--
Cheers
macropod
[MVP - Microsoft Word]



Simon J said:
Can anyone help on why I get seperate pages out when i try to perform
the following?
{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}}
This is from the Microsoft Support site Article ID: 211303.
I assume that I should get two lists headed up if i work through the
example.
Many thanks in advance
Simon- Hide quoted text -

- Show quoted text -

Hi Marcopod,

Thanks, your scripting does make it a lot easier. The issue about the
name per page was down to the type of mail merge I was using. As soon
as I used the Directory option from Start Mail Merge it started to
come together.

Many thanks again
Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top