Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Thanks a lot for your information.
The simple addition worked fine, howerver the date manipulation did not even though things looked right. I made the addition at the SQL server statement level and things are working ok now. One day when I'll have more time I'll check again how to make that date adding script work Thanks again ! Doug Robbins - Word MVP wrote: Adding a number to a numeric field is quite simple using the following field construction { = 10 + { MERGEFIELD Number } } Adding to dates is a bit more complex because you may exceed the number of months in a year. As a result, you need the following field construction { IF { = 10 + { MERGEFIELD Date \@ "MM } } 13 "{ = 10 + { MERGEFIELD Date \@ "MM" } }/{ MERGEFIELD Date \@ "dd" }/{ MERGEFIELD Date \@ "yyyy" }" "{ = 10 + { MERGEFIELD Date \@ "MM" } - 12 }/{ MERGEFIELD Date \@ "dd" }/{ = 1 + { MERGEFIELD Date \@ "yyyy" }}" } You must use Ctrl+F9 to insert each pair of field delimiters { }. For a wealth of information on date field calculations in Word, see: http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code in a mailmerge template | Mailmerge | |||
Word Mailmerge with Access via DDE | Mailmerge | |||
Trying to suppress Select Table box in Excel-Word mailmerge | Mailmerge | |||
Protect mailmerge document | Mailmerge | |||
Included Property in Word 2003 MailMerge | Mailmerge |