Posted to microsoft.public.word.mailmerge.fields
|
|
Adding days to Merge Field
You might do better downloading Macropod's sample document from the link
provided and edit the examples rather than attempt to enter them from the
keyboard.
--
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
TotallyConfused wrote:
Thanks for responding. This is what I have : I put {{SET Delay
3}DATE \@ "MMMM d, yyyy" \*MERGEFORMAT}{SET
jd{=jd+(MOD(jd,7)4*(7-MOD(jd,7))}
This is what I have and it is not working. I am probably now reading
it right. Can you please tell me what I am doing wrong. I am trying
to understand this. I do not work with Word a lot but by doing this
it will save us a lot of time. I assume "jd" is for Julian Day?
Thank you.
"macropod" wrote:
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.
|