View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default Adding days to Merge Field

Hi TotallyConfused,

To see how to add 3 days to a mailmerge date, check out 'Date Calculations In A Mailmerge' in my Date Calc 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902

Note that the example field adds 14 calendar days, not 3 business days. To add 3 business days, which presumably means skipping over
weekends, you'd need to expand the field coding (select it and press Shift-F9) and:
.. change '{SET Delay 14}' to '{SET Delay 3}'
.. add a new field after the one coded as '{SET jd{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045+Delay}'. The new
field should be coded as {SET jd{=jd+(MOD(jd,7)4)*(7-MOD(jd,7))}}, with the field braces (ie '{ }') created in pairs via Ctrl-F9
(you can't just copy & paste them from here).
Skipping over public holidays as well takes a lot more work. I'm currently working on an update to the document to show how to do
this, but it's not quite ready for release.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"TotallyConfused" wrote in message
...
Please can someone tell me how to revise this merge field to add 3 business
working days. I have a date field and I have to add a due date field (DATE\@
"MMMM d, yyyy"\*MERGEFORMAT), 2007. the due date field needs to be greater
by 3 business working than the date field. I would appreciate some helping
me with this. I was referred to macropod, and I have tried everything, can't
seem to make it work. Thank you in advance for any help you can provide.