View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Query Option to recognize date

You could perform a calculation on the Outcome field and the ones containing
text will throw an error. You can then trap that error to produce the result
you want e.g.

{ IF{ =MOD({ MERGEFIELD Outcome \@ "yyyy"} ,1)} "!*" "{ Mergefield
Outcome \@ "dd-MMM" }" }

Field error messages start with an exclamation mark so you can compare with
"!*" i.e. an exclamation mark and following text. The type of calculation
isn't really important.

{ IF{ = ({ MERGEFIELD Outcome \@ "yyyy"} * 1)} "!*" "{ Mergefield
Outcome }" }

would work just as well

I have added this as an example to my web page
http://www.gmayor.com/formatting_wor...m#date_or_text
--

Graham Mayor - Word MVP

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



klam wrote:
Hi Doug,

Thx a mint for your reply.

I agree that another column would be easier, but the fundamental
problem remains even if I use Conditional Formatting: what is the
formula to get it to recognize the date/populate a new cell with a
"Yes" if the "Outcome" column is equal to a date?

Any suggestions appreciated.
Karen

"Doug Robbins - Word MVP" wrote:

Easier to add another column to the spreadsheet in which populated
the cells with an Excel formula that will provide a yes/no type
result that will be easier to use as a condition in the mailmerge
process.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"klam" wrote in message
...
Hi all,

I have an Excel spreadsheet where one column, "Outcome" is set as
Date format (dd-mmm). This column contains different dates or
text. I only want
the rows with dates in this column to be in the mail merge.

Under Mail Merge Helper I choose Query Options but don't know to
get it to recognize just the ones with dates. Separately, I have
tried things like: Outcome equal to "**-***", **-***, **"-"***,
{dd-mmm}, dd-mmm but no mail merge happens as "no data records
matched".

Anyone know what the "compare to" should be for this Query Option?

(Using Word 2000 on XP) Thx for any suggestions.

cheers,
karen