View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default blank record empty space after merge

Press Alt+F9 in the mailmerge main document and set up the field codes as
follows

{MERGEFIELD Firstname }[no space]{ IF { MERGEFIELD MiddleInitial } =
""[Space]""[Space]"[Space]{ MERGEFIELD Middle Initial }}[Space]{ MERGEFIELD
LastName }

Where I have [no space] above do NOT have a space and where I have [Space]
insert a space.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"John" wrote in message
...
Thank you Cindy. I very much appreciate the specific how to.

I know what you are asking me to do is simple, but for some reason it is
not
working, or I am not properly executing.

The If...Then...Else box asks for the field name of which I chose the
"client middle name" field. For the "Comparison box" I chose "is blank"
and
the "compare to" box I left blank.
There are two other box choices "insert this text" and "otherwise insert
this text"

Where exactly is the "space" to be typed for the false answer choice?

I played a bit with the If...Then...Else box and the info you supplied and
still get the "empty" space between "client first name" and "client last
name" fields when the "client middle name" is blank and merge executed to
a
new document.

I am missing something really simple here.

Thank you in advance for your help,

John R.


"Cindy M -WordMVP-" wrote:

Hi ?B?Sm9obg==?=,

I am using Office 2000 with XP operating system.

I could hug you for giving us this information, right at the top :-)

You need to incorporate an IF field in the main merge document. The IF
field
will test whether the mergefield is passing a zero-length string, and
insert
nothing, or a space, accordingly.

This type of IF is very easy to set up. On the mail merge toolbar you'll
see a
button labelled "Insert Word field". Click that and choose the
"If...Then...Else" entry (or something similar, I don't recall the exact
caption).

You should see a dialog box where you can select the mergefield you want
to
test, the value to test against ("is blank"), a box for the "true" result
(leave
it empty) and a box for the false result (type a space).

I have a database (excel) and form files (word) set up.

The merge codes in question are "client first name" "client middle
initial"
and "client last name"

My problem is that some of the "client middle initial" files/records
are
blank and therefore leave an empy space between "client first name" and
"client last name" in my letter after the merge process has taken
place. I
want to have that space automatically closed during the merge process
if that
"client middle initial" file is blank. If the "client middle initial"
file
has information contained within it, then I want to, of course, have
that
information placed in the document when merging.

How do I accomplish this?


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply
in the newsgroup and not by e-mail :-)