In which case you could use two independent IF fields, like:
{IF{MERGEFIELD "Childs_first_names_3"}<> "" "{MERGEFIELD
"Childs_first_names_3"}, " ""}{IF{MERGEFIELD "Childs_first_names_2"}<> ""
"{MERGEFIELD "Childs_first_names_2"} and " ""}{MERGEFIELD
"Childs_first_names_1"}
Note that this reverses the name order, but the original poster's reply
indicated that wouldn't have been a problem either.
Cheers
The only problem with the solution below is that it uses
nested "IF" statements. Those work in a regular merge,
but when you merge to Outlook, they don't work properly.
At least, that has been my experience.
Alan
------------------------------------------------------
>-----Original Message-----
>Hi,
[quoted text clipped - 3 lines]
>{IF{MERGEFIELD "Childs_first_names_2"}= "" {MERGEFIELD
>"Childs_first_names_1"} {IF
{MERGEFIELD "Childs_first_names_3"}=""
>"{MERGEFIELD "Childs_first_names_1"} and {MERGEFIELD
>"Childs_first_names_2"}" "{MERGEFIELD "Childs_first_names_
1"}, {MERGEFIELD
>"Childs_first_names_2"} and
{MERGEFIELD "Childs_first_names_3"}"}}
>This version of the field first tests whether there is a
second child's name
>and, if not, inserts only the first child's name. If
there is a second
>child's name, the field then tests whether there is a
third child's name
>and, if not, inserts only the first and second children's
names - otherwise
>all three names are inserted as 'child 1, child 2 and
child 3'.
>Cheers
>
>"Gossipsfrolick" <hemiola@nospamgotadsl.co.uk> wrote in
message
>news:410827c2$0$108$65c69314@mercury.nildram.net...
>> Hullo, I'm wondering whether someone could help me,
please ? I've been
>> asked to help a charity working on some new computers.
Although I'm more
>> than happy with the majority of Office, I have never
had any occasion to
>use
>> Mailmerge and the majority of instructions, such as
those in Help or the
>> Microsoft site, only seem to deal with the straight
forward set-ups.
>> The charity works to gain sponsors for children in 3rd
World areas and
>> writes to these sponsors periodically to keep them
uptodate. The source
>data
>> document is an Excel document. Entering mailmerge
fields to fill address
>and
>> salutation details are not a problem but the problems
arise with inserting
>> the names of the children because some sponsors support
as many as three
>> children.
>>
>> "A typical sentence might run: I'm delighted to enclose
a photo of
>> xxxxxxxxxxxxxx which we received a week ago."
>> In place of the xxxxxxxxxxx would be the mailmerge
fields:
>> ?Childs_first_names_1? ?Childs_first_names_2? ?Childs_fi
rst_names_3?
>> I have managed to sort out what to do if I want to
insert 'and' or a comma
>> between the children's name ( though not how to do ,
between the first two
>> and 'and' between the second two, if there are indeed 3
children; or 'and'
>> between children 1 and 2 if there is no third child).
However, I cannot
>get
>> rid of the space left after the first or second child's
name if the next
>> field is blank.
>>
[quoted text clipped - 3 lines]
>Childs_first_names_2}<>
>> "" "," "" }{MERGEFIELD "Childs_first_names_2" }{If
{MERGEFIELD
>> Childs_first_names_3}<> "" "and" "" }
{MERGEFIELD "Childs_first_names_3"}
>> but is still leaves a small gap.
>>
>> I've also investigated switches but without any degree
of satisfaction.
>> Any help would be very much appreciated please as at
the moment I'm
>spending
>> a lot of time on it and remaining stumped! The more
straightforward the
>> answer, the better!
>>
[quoted text clipped - 3 lines]
>>
>> P.S. I've tried looking through past posts but none
seem exactly relevant.
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.725 / Virus Database: 480 - Release Date:
19/07/2004
>.