Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / July 2004

Tip: Looking for answers? Try searching our database.

Blank fields when merging from Excel

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gossipsfrolick - 28 Jul 2004 23:25 GMT
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_first_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.

I tried:

{MERGEFIELD "Childs_first_names_1"}{ If {MERGEFIELD 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!

Thanks in anticipation.

Kate

P.S. I've tried looking through past posts but none seem exactly relevant.
macropod - 29 Jul 2004 01:00 GMT
Hi,

Try:

{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

> 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
[quoted text clipped - 40 lines]
>
> P.S. I've tried looking through past posts but none seem exactly relevant.
Gossipsfrolick - 29 Jul 2004 18:38 GMT
Very many thanks - it works! I would never have worked that out, although I
did try organising it so that I mentioned Child 2 before child1 but without
success. I'm still trying analyse exactly what you have done in case I need
to repeat it.

Grateful thanks - you've saved me a great deal of embarrassment.

Gillian

> Hi,
>
[quoted text clipped - 69 lines]
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.725 / Virus Database: 480 - Release Date: 19/07/2004
alan-hurley@socal.rr.com - 30 Jul 2004 04:24 GMT
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 - 35 lines]
>> 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
[quoted text clipped - 32 lines]
>
>.
macropod - 30 Jul 2004 23:08 GMT
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

>.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.