View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default IF THEN ELSE CODE

Are you sure that a blank record entry actually does produce a blank? Insert
the field on its own and see what it produces, then trap that. Otherwise
apart from the smart quotes it looks OK.

Personally I would quote the alternative options also

{ IF { MERGEFIELD NationalFilingDate }= "" "{ MERGEFIELD ApplicationDate \@
"MMMM dd, yyyy" }" "{ MERGFIELD NationalFilingDate \@ "MMMM dd, yyyy"}" }

--

Graham Mayor - Word MVP

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



"manatee08" wrote in message
...
Can someone please tell me what is wrong with this code. What I am trying
to
do is:

IF NationalFilingDate field is blank, THEN input the ApplicationDate ELSE
input the NationalFilingDate using the format of MMMM dd, yyyy. This is
the
code that I have so far:

{ IF { MERGEFIELD NationalFilingDate }= "" { MERGEFIELD ApplicationDate \@
"MMMM dd, yyyy" } { MERGFIELD NationalFilingDate \@ "MMMM dd, yyyy"} }