![]() |
|
|
|
#1
|
||||
|
||||
|
Did you even read the link I posted? Download the document I referred to and on page 7 you will see a heading 'Calculate a day, date, month and year, using n days delay'. Select the date in that section. Right click and 'toggle field codes'. Copy the code and paste to where you want the calculated date. Change the delay to 1 and the switch to "dd/MM/yyyy"
{QUOTE {SET Delay 14} {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)}} "{dd}-{mm}-{yy}" \@ "dddd, d MMMM yyyy"}
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#2
|
|||
|
|||
|
Sorry, I Did read and then downloaded the next document. Ill try this today.
Quote:
|
|
#3
|
|||
|
|||
|
Okay, I can only get the following message. I'm sure its something simple, but I really have no idea what I'm doing.
Error! Too many picture switches defined. Here is what the code looks like to me. I'm sure you guys can spot the errors. I do appreciate your time |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Preceding Day on Future Date.. | ThorstenG | Project | 0 | 12-18-2017 06:14 AM |
Date field - future date calculation + only business days
|
neon4 | Word | 7 | 01-21-2016 02:21 PM |
macro to automatically date sheet tab
|
Jackie | Excel Programming | 13 | 05-24-2015 02:36 PM |
VBA code for inserting a future date
|
cosmopolitan | Word VBA | 1 | 08-14-2013 01:58 PM |
Automatic date updates.
|
WLVanS | Word | 12 | 01-29-2011 04:01 AM |