Double blank when no middle name

A

alan

I have Word and Outlook 2002 SP2.

How do you avoid a double blank space when you select <<First Name>>
<<Middle Name>> <<Last Name>> when there is no middle name?

Alan
 
D

Doug Robbins

Use an If...then...Else field construction

{ MERGEFIELD FirstName } { IF { MERGEFIELD MiddleName }= "" "" "{ MERGEFIELD
MiddleName } "}{MERGEFIELD LastName}

Note that there is a space between the } and the " in the second instance of
{ MERGEFIELD MiddleName } "
--
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
 
M

macropod

Or perhaps:
{MERGEFIELD FirstName} {IF{MERGEFIELD MiddleName}= "" {MERGEFIELD LastName}
"{MERGEFIELD
MiddleName} {MERGEFIELD LastName}"}

Cheers
 
G

Graham Mayor

Or even

{ Mergefield FirstName }<space>{ IF{ Mergefield MiddleName } <> "" "{
Mergefield MiddleName }<space>" }{ Mergefield LastName }

;)
 

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