Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Alienmouse Alienmouse is offline
external usenet poster
 
Posts: 2
Default FORMS CONSECUTIVE AUTO DATE

I am trying to create a form that has five dated columns. I want the dates to
follow each other( i.e. 2-18, 2-19, 2-20...) and change each day. I've looked
though help (Word 2003) can't find a way to do this. There must be. I hope.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jean-Guy Marcil[_2_] Jean-Guy Marcil[_2_] is offline
external usenet poster
 
Posts: 373
Default FORMS CONSECUTIVE AUTO DATE

"Alienmouse" wrote:

I am trying to create a form that has five dated columns. I want the dates to
follow each other( i.e. 2-18, 2-19, 2-20...) and change each day. I've looked
though help (Word 2003) can't find a way to do this. There must be. I hope.


This is a question that comes back all the time.
The easy answer is: "Sorry, way too difficult to handle."

If you do not believe me, see the following discussion on the exact (or
almost same) question that you have (Difference being the other poster wanted
to know how to add two businees day, whereas you are asking how to add 1, 2,
3, 4 and 5 days... What about weekends, holidays, etc...)

http://groups.google.com/group/micro...9b78cd4e1f5fe5
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default FORMS CONSECUTIVE AUTO DATE

Hi Alienmouse,

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 'Calculate a day, date, month and year, using n days delay' 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 statement 'SET Delay 1' so that it reads 'SET Delay 1' and change the 'dddd, d MMMM yyyy' mix/order
to suit your needs. This field will now display tomorrow's date. If you want today's date to display on your form, you can use a
standard DATE field for that.

With the second field, edit the coding so that it reads:
{QUOTE
{SET Delay 1}
{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 1'.

You can now make as many copies as you need of the second field, positioning them wherever you want the subsequent 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]
-------------------------

"Alienmouse" wrote in message ...
I am trying to create a form that has five dated columns. I want the dates to
follow each other( i.e. 2-18, 2-19, 2-20...) and change each day. I've looked
though help (Word 2003) can't find a way to do this. There must be. I hope.


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Alienmouse Alienmouse is offline
external usenet poster
 
Posts: 2
Default FORMS CONSECUTIVE AUTO DATE

Thank you. I needed simple, quick fix without all the angst at google group.
This works for me.

"macropod" wrote:

Hi Alienmouse,

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 'Calculate a day, date, month and year, using n days delay' 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 statement 'SET Delay 1' so that it reads 'SET Delay 1' and change the 'dddd, d MMMM yyyy' mix/order
to suit your needs. This field will now display tomorrow's date. If you want today's date to display on your form, you can use a
standard DATE field for that.

With the second field, edit the coding so that it reads:
{QUOTE
{SET Delay 1}
{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 1'.

You can now make as many copies as you need of the second field, positioning them wherever you want the subsequent 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]
-------------------------

"Alienmouse" wrote in message ...
I am trying to create a form that has five dated columns. I want the dates to
follow each other( i.e. 2-18, 2-19, 2-20...) and change each day. I've looked
though help (Word 2003) can't find a way to do this. There must be. I hope.



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Jean-Guy Marcil[_2_] Jean-Guy Marcil[_2_] is offline
external usenet poster
 
Posts: 373
Default FORMS CONSECUTIVE AUTO DATE

"Alienmouse" wrote:

Thank you. I needed simple, quick fix without all the angst at google group.
This works for me.


Sorry to have given you the wrong impression. I meant that it was difficult
if you need to work with business days only (and exclude weekends, local
holidays, etc.)

If all you need is blindly adding the next five days, whether those future
days are weekend days or not, then yes, it is much easier... Once we have
someone like macrop do the work for us...

Cheers.
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
auto date completion or insert date in word 2007 dt46dt46dt46 Microsoft Word Help 1 August 12th 07 05:58 AM
Have a Start date, how do I add an auto End date to my letter? greenman Microsoft Word Help 2 June 16th 06 01:44 AM
AUTO INSERT CONSECUTIVE NUMBERS plynsn316 Microsoft Word Help 1 May 16th 06 07:03 PM
Auto date is incorrect -- date in settings is correct jbf Microsoft Word Help 1 July 25th 05 04:43 PM


All times are GMT +1. The time now is 01:30 AM.

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"