#1   Report Post  
Posted to microsoft.public.word.docmanagement
pcor pcor is offline
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Fonts In Word 2007 JORDON Microsoft Word Help 3 March 30th 08 02:06 AM
word 2007 adding a pdf Lena M SMith Microsoft Word Help 2 September 30th 07 06:57 AM
Word 2007 - Adding Own Templates RFJ Microsoft Word Help 1 July 5th 07 11:20 AM
word 2007 adding a footer emike Microsoft Word Help 1 April 17th 07 04:15 PM
adding zip + 4 to envelopes in word 2007 Fred Microsoft Word Help 1 March 4th 07 05:13 PM


All times are GMT +1. The time now is 07:29 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"