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 / February 2005

Tip: Looking for answers? Try searching our database.

How do I add a space in a line if a merge field is blank?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
S Cocke - 10 Feb 2005 22:57 GMT
I'm trying to merge a doc that has names, some with maiden names and some
without.  I want the merge to go first(space)maiden(space)last UNLESS there
is no maiden name, in which case I only need ONE space.

Any ideas?
Doug Robbins - 10 Feb 2005 23:14 GMT
Use and If...Then...Else field that checks to see if the maiden field is
blank and if it is not, enters the maiden followed by a space, otherwise, it
inserts nothing.

{ IF { MERGEFIELD "maiden" } <> "" "{ MERGEFIELD "maiden" } " "" }

Signature

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

> I'm trying to merge a doc that has names, some with maiden names and some
> without.  I want the merge to go first(space)maiden(space)last UNLESS
> there
> is no maiden name, in which case I only need ONE space.
>
> Any ideas?
S Cocke - 11 Feb 2005 17:31 GMT
Thanks. This may sound dense, but can you give me a step by step?

In the word doc, I have <<firstname>> <<maiden>> <<last>>

So, do I insert the IF...THEN  function after I insert <<maiden>> or before?
         

Also, in the IF...THEN dialog box, where do I put the string that you gave
me?  Do I enter If <<maiden>> is blank and then enter the string in the
"insert this text" box?      

THANKS,
Shannon

> Use and If...Then...Else field that checks to see if the maiden field is
> blank and if it is not, enters the maiden followed by a space, otherwise, it
[quoted text clipped - 8 lines]
> >
> > Any ideas?
Doug Robbins - 11 Feb 2005 23:13 GMT
Type

MERGEFIELD "maiden"

then select it and press Ctrl + F9.  You should now see

{ MERGEFIELD "maiden" }

Do this again so that you have

{ MERGEFIELD "maiden" }{ MERGEFIELD "maiden" }

Now add the IF, the <> "" " etc. so that you have

IF { MERGEFIELD "maiden" } <> "" "{ MERGEFIELD "maiden" } " ""

Don't forget the space after the second { MERGEFIELD "maiden" } before the
closing quote

Now select all of that and press Ctrl + F9 which should give you

{ IF { MERGEFIELD "maiden" } <> "" "{ MERGEFIELD "maiden" } " "" }

Now press Alt+F9 to toggle off the field codes and then execute your merge.

Signature

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

> Thanks. This may sound dense, but can you give me a step by step?
>
[quoted text clipped - 24 lines]
>> >
>> > Any ideas?
Karen Hart - 11 Feb 2005 00:53 GMT
Karen:
Use the IF statement from the INSERT WORD FIELD menu after your MAIDEN
field:
{IF {MERGEFIELD Maiden} <> "" " " ""}
translates: If maiden is not blank, put a space here. Otherwise, put no
space.
Karen Hart

> I'm trying to merge a doc that has names, some with maiden names and some
> without.  I want the merge to go first(space)maiden(space)last UNLESS
> there
> is no maiden name, in which case I only need ONE space.
>
> Any ideas?
 
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.