Word 2007 if then else problem

Microsoft Word 2007
May 20, 2010 at 12:33:34
Specs: Windows XP
In a Word 2007 document I'm trying to do an if...then...else field to compare a birthdate in an Excel 2007 file to a date I've entered and give a different text such as "To the Parent of" else "Dear Sir or Madam"

However, despite all my attempts to make this work it seems to read the random dates wrong regardless of their format or how I set up the rule.

Example rule I'm using:
{IF {MERGEFIELD DOB }<= "1/1/1992" "MINOR" "ADULT"}

See More: Word 2007 if then else problem

Report •

May 20, 2010 at 13:07:59
I'm just guessing here, but is it possible that it is picking up "1/1/1992" as a text string and not a date, therefore giving you erroneous results?

Is there a way to force Word to look at "1/1/1992" as a date inside the rule?

Report •

May 20, 2010 at 13:24:23
Look here at the line that begins:

"Testing for events that occur before or after a certain date"


It's about 3/4 of the way down the page.

It suggest using this form:

{IF{MERGEFIELD DOB \@ "yyyyMMDD"} <= 19920101 "Minor" "Adult"}



Report •

Related Solutions

Ask Question