View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
manatee08 manatee08 is offline
external usenet poster
 
Posts: 3
Default IF THEN ELSE CODE

When the field NationalFilingDate is blank, it produces this result: 12:00:00
AM.
Because of this, I am assuming that ApplicationDate won't be produced
because the field is not actually blank, right?

Using the code above, when the NationalFilingDate has no date in the field,
the ApplicationDate has today's date rather than the ApplicationDate, which
by itself produces 10/15/2008.



"Graham Mayor" wrote:

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"} }



.