how do I remove excess spacing between data flelds when using wor.

G

Gene

«Sal» «FirstName» «MI» «LastName» «Suffix» I have excess spacing between the
middle initial and last name when the person does not have a middle initial.
 
D

Doug Robbins

Use an If...Then...Else field that returns the MI and the LastName if the MI
exists or just returns the LastName if it does not.

{ IF { MERGEFIELD "MI" } <> "" { MERGEFIELD "MI"} { MERGEFIELD "LastName" }
{ MERGEFIELD "LastName" } }

Use a non-breaking space between { MERGEFIELD "MI"} and { MERGEFIELD
"LastName" } so that it gets treated as the result for the "true" condition.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
G

Graham Mayor

Doug

Given the space is that going to work without the speech marks?

{ IF { MERGEFIELD MI } <> "" "{ MERGEFIELD MI} { MERGEFIELD LastName }" "{
MERGEFIELD LastName }" }

might be better in the circumstances?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
D

Doug Robbins

Thanks, Graham. I thought that the non-breaking space might do the trick,
but testing it now, I find that it doesn't.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - 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