Comparing Dates During Print MergeLast reviewed: November 17, 1997Article ID: Q63687 |
The information in this article applies to:
SUMMARYTo set up a print merge in Microsoft Word for the Macintosh that involves comparison of a date field in a data document to a specific date (such as today's date), the month, day, and year must be compared individually. That is, the date field in the data document must be split up into month, day, and year fields, as in the following example.
Month Day Year Name ------------------------------ 5 21 1990 John 6 21 1990 David 7 21 1990 SueThe main document must also compare the year, month, and day fields against the specified date using embedded IF statements, as follows:
<<set TodayMonth=?Enter Today's month as a number>> <<set TodayDay=?Enter Today's day as a number>> <<set TodayYear=?Enter Today's year as a number>> <<if TodayYear>=<<year>>>> <<if TodayMonth>=<<month>>>> <<if TodayDay>=<<day>>>> <<name>> <<ENDIF>> <<ENDIF>> <<ENDIF>> MORE INFORMATIONFor more information on using Word's print merge feature, see "Merging Documents" on pages 579-656 of the "Microsoft Word User's Guide" version 5.0 manual, or see "Form Letters" on pages 69-91 of the "Reference to Microsoft Word" version 4.0 manual, or see pages 64-92 in the "Reference to Microsoft Word" version 3.0 manual.
|
Additional query words: macword macword5 word6
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |