View Single Post
  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default OT: Creating an If...Then...Else rule for mail merges

Hi Rich,

See: http://www.gmayor.com/export_field.htm

--
Cheers
macropod
[MVP - Microsoft Word]


"Rich/rerat" wrote in message ...
Graham Mayor,
Oooops, your right, cause I now see if the contact had both a first name and
a nick name, it would pull the first name, instead of using the nick name
for that contact.

Just curious is there an easy way to copy and paste a Word function formula
from a word document, to a news posting, instead of having to manually type
it out. When I tried to copy and paste the formula for this question, I got
the merge result of the formula, not the formula itself.

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


"Graham Mayor" wrote in message
...
I think you have that the wrong way round?
{IF {Mergefield NickName} "" "{Mergefield NickName}" "{Mergefield
First_Name}" }

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Rich/rerat wrote:
John Salerno,

Try the following IF function in your Word Document, once you link
your data source to the Mail Merge document.



{if {Mergefield First_Name} "" "{Mergefield First_Name}"
"{Mergefield NickName}" }



You can not just type this, you will need to insert the fields into
the formula. A simple way of doing it is as follows.

1. Insert Word Field button Choose If....Then

2. Select if first name Is Not Blank. Which will give you this in
your Word Document.

{if {Mergefield first_name} "" "" "" }

3. Click mouse in the center of the Second double quotes (""). From
the Mail Merge toolbar Select Insert Mail Mergefields button, and
choose "First Name" Apply/OK.

4. Click mouse in the center of the Third double quotes (""). From
the Mail Merge toolbar Select Insert Mail Mergefields button, and
choose "NickName" Apply/OK.