Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Numbering / July 2003

Tip: Looking for answers? Try searching our database.

automatic date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
K.B. Yap - 24 Jul 2003 13:34 GMT
Hallo,

I am trying to make a document with an automatic date for
today, tomorrow and the day after tomorrow. For the date
of today it is easy (automatic ON), but how can I make
(today) the date of tomorrow automatic? I hope you
understand what the problem is. It is about a letter for a
saturday and sunday which we sent on friday.

I'm not sure in which group I have to ask this question

K.B. Yap
Doug Robbins - Word MVP - 24 Jul 2003 14:38 GMT
Hi K.B,

If you create a template for those letters and in that template you have
bookmarks named Friday, Saturday and Sunday and if you have a macro in the
template named autonew that contains the following code:

Dim i As Integer
i = 6 - Weekday(Date)
With ActiveDocument
   .Bookmarks("Friday").Range.InsertBefore Format(DateAdd("d", i, Date),
"MMMM dd, yyyy")
   .Bookmarks("Saturday").Range.InsertBefore Format(DateAdd("d", i + 1,
Date), "MMMM dd, yyyy")
   .Bookmarks("Sunday").Range.InsertBefore Format(DateAdd("d", i + 2,
Date), "MMMM dd, yyyy")
End With

It will insert the dates for the next Friday, Saturday and Sunday if you
create the document by selecting New from the File menu and selecting that
template on any day of the week but Saturday.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a consulting basis.

Hope this helps
Doug Robbins - Word MVP
> Hallo,
>
[quoted text clipped - 8 lines]
>
> K.B. Yap

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.