![]() |
#6
|
||||
|
||||
![]()
Your explanation was simple enough before, but what you require is not as simple as you imagine. For example, if you refer to the document I linked the field construction required to add 3 days to the current date is
{QUOTE {SET Delay 3} {SET a{=INT((14-{DATE \@ M})/12)}} {SET b{={DATE \@ yyyy}+4800-a}} {SET c{={DATE \@ M}+12*a-3}} {SET d{DATE \@ d}} {SET jd{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045+Delay}} {SET e{=INT((4*(jd+32044)+3)/146097)}} {SET f{=jd+32044-INT(146097*e/4)}} {SET g{=INT((4*f+3)/1461)}} {SET h{=f-INT(1461*g/4)}} {SET i{=INT((5*h+2)/153)}} {SET dd{=h-INT((153*i+2)/5)+1}} {SET mm{=i+3-12*INT(i/10)}} {SET yy{=100*e+g-4800+INT(i/10)}} "{mm}-{dd}-{yy}" \@ "MM/dd/yyyy"} You cannot simply add 3 to the date or (say) 30th December + 3 would be 32nd December. You can insert date fields that will give the required values for today's date for the three dates (see attached), but it will not work with typed text dates. You cannot calculate text dates in this manner in a Word table. If you are not using date fields, the macro approach is still the most sensible option here.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
vjvj123 | Word VBA | 12 | 09-27-2018 03:09 PM |
![]() |
FUGMAN | Excel Programming | 7 | 02-05-2017 08:37 AM |
Pasting text from Excel cell into word without creating a table, and keeping the in-cell formatting | hanvyj | Excel Programming | 0 | 08-28-2015 01:15 AM |
![]() |
hwrigley | Word Tables | 7 | 02-18-2014 02:59 AM |
Auto-populate an MS Word table cell with text from a diff cell? | dreamrthts | Word Tables | 0 | 03-20-2009 01:49 PM |