Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Adding in Word 2007
Is there a way to do the following:
I would type in 1 Jan 2007 and the computer would fill in BELOW date that are seven days apart ie 7 jan 2007 14 Jan 2007 etc etc Thanks |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Adding in Word 2007
Hi pcor,
To see how to do this and just about everything else you might want to do with dates in Word, check out my Date Calc 'tutorial', at: http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 or http://www.gmayor.com/downloads.htm#Third_party In particular, look at the items titled 'Interactively Calculate A Past Or Future Date' and 'Calculate a Stepped Date Range'. For your purposes, you'll need to make some changes (mostly by deleting unnecessary bits of field coding). First copy both fields to your document, then press Alt-F9 to expose the field coding. With the first field, edit the coding so that it reads: {QUOTE {ASK StartDate "What is the starting date, in dd/mm/yyyy format, please?"} {SET a{=INT((14-{StartDate \@ M})/12)}} {SET b{={StartDate \@ yyyy}+4800-a}} {SET c{={StartDate \@ M}+12*a-3}} {SET d{StartDate \@ d}} {SET jd{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045}} {IF{={IF{={StartDate \@ "dddd"}}= "!*" 0 1}+{IF{={StartDate \@ "MMMM"}}= "!*" 0 1}+{IF{a}= "!*" 1 0}}= 0 "{StartDate \@ "dddd, d MMMM yyyy"}." "Data entry error!"}} and change the 'dddd, d MMMM yyyy' mix/order to suit your needs. Note the deletion of '+Delay' from the 'SET jd' line. With the second field, edit the coding so that it reads: {QUOTE {SET Delay 7} {SET jd{=jd+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)}} {QUOTE"{dd}-{mm}-{yy}" \@ "dddd, d MMMM yyyy"}} again, changing the 'dddd, d MMMM yyyy' mix/order to suit your needs. Note the change of 'SET Delay 6' to 'SET Delay 7'. You can now make as many copies as you need of the second field, positioning them wherever you want the dates to go. When you're done, toggle the filed codie display off again (Alt-F9), press Ctrl-A to select the whole document then F9 to update the fields. Cheers -- macropod [MVP - Microsoft Word] ------------------------- "pcor" wrote in message news Is there a way to do the following: I would type in 1 Jan 2007 and the computer would fill in BELOW date that are seven days apart ie 7 jan 2007 14 Jan 2007 etc etc Thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding Fonts In Word 2007 | Microsoft Word Help | |||
word 2007 adding a pdf | Microsoft Word Help | |||
Word 2007 - Adding Own Templates | Microsoft Word Help | |||
word 2007 adding a footer | Microsoft Word Help | |||
adding zip + 4 to envelopes in word 2007 | Microsoft Word Help |