Correct spacing for blank fields in name mailmerge

H

Harry Weeds

How do you keep Word from putting an extra space between fields that are on
the same line when there is a field that may be blank for some records - a
middle initial field, for example. Some records will have middle initials
resulting in correct spacing between the various fields, but when the middle
initial field is empty the spacing between the first and last name will be
wrong. Thank you for your help.
 
C

Charles Kenyon

You use an IF field to test for any contents in the may-be-blank field. If
the field is not blank, insert the field and a space, if it is blank, insert
nothing.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
G

Graham Mayor

{Mergefield First_Name}{IF {Mergefield Initial} <> "" " {Mergefield
Initial}"} {Mergefield Last_Name}

Note the space at
" {Mergefield Initial}"}
and before
{Mergefield Last_Name}
No space after
{Mergefield First_Name}
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
R

RRR_News

Harry,
This also works for me:
{ Mergefield First_Name }{ Mergefield Middle_Name \b " " } { Mergefield
Last_Name }

Using the "before" (\b) switch. And using the spacing that Graham has stated
already.

For prefixes such as Mr., Mrs., Ms., I have a column named "Prefix". The line is
set up lile this:

{ Mergefield Prefix \f " " }{ Mergefield First_Name}{Middle_Name \b " " } {
Mergefield Last_Name }

Using the "after" (\f) switch. Also using the spacing that Graham has stated
already.

--
Have A Good Day
Rich/rerat

Add MS to your News Reader: news://msnews.microsoft.com
(RRR News) <message rule>
<<Previous Text Snipped to Save Bandwidth When Appropriate>>


{Mergefield First_Name}{IF {Mergefield Initial} <> "" " {Mergefield
Initial}"} {Mergefield Last_Name}

Note the space at
" {Mergefield Initial}"}
and before
{Mergefield Last_Name}
No space after
{Mergefield First_Name}
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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