Create date based checklists for printing

H

Hari

I have created a document which is a checklist to be compleated everyweekday
by employees. I want to print out the checklists one month in advance so
they can be put in a binder. Does anyone have an idea on how I can insert
the dates to the documents without mauanlly editing the document each time?

Regards,
Hari
 
C

Cooz

Dear Hari,

Unfortunately this cannot be accomplished by fields only; you have to use
VBA as well.
I suggest you put this macro in the template you're using (you may have to
use the macro under B if you use Word 2002 or earlier):

A.
Sub AutoNew()
ActiveDocument.Variables("Date28").Value = _
Format(Date + 28, "dd-MMMM-yyyy")
ActiveDocument.Fields.Update
End Sub

B.
Sub AutoNew()
On Error GoTo ErrorTrap_AutoNew:
ActiveDocument.Variables("Date28").Value = _
Format(Date + 28, "dd-MMMM-yyyy")
ActiveDocument.Fields.Update
Exit Sub
ErrorTrap_AutoNew:
ActiveDocument.Variables.Add Name:="Date28", _
Value:=Format(Date + 28, "dd-MMMM-yyyy")
Resume Next
End Sub

Place this field in your document where you want to have your 'date + 28
days':
{ DOCVARIABLE Date28 }
Be sure to insert { } by means of pressing Ctrl-F9.

Success,
Cooz
 
C

Charles Kenyon

You would need a 31-page document with calculated date fields. This is more
complex than you might imagine, but it can be done. See
http://addbalance.com/word/datefields2.htm for information on the different
kinds of ways to make a date calculation work. It includes links to
utilities to create the fields and an explanation of different macros that
can be used instead of fields. It also has a link to
www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902 which is a document
with various fields already created.

--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
T

Tony Jollans

Actually, if you're doing this on a per-calendar-month basis (and don't need
general case date addition logic) the field codes aren't that horrendous.
 
C

Charles Kenyon

They could be simpler than many such fields, but far from simple. You simply
would only use a month and year formatted field and manually enter the day
portion for each. The Formatting Date Fields section of
http://word.mvps.org/FAQs/TblsFldsFms/DateFields.htm shows the switches to
pick out only the month and year in a date field. I expect that the original
poster would want the current month plus one in order to print such a
calendar before the month actually starts. If you are going to also use the
field for the year, you would still be testing for the end of the year.

On reflection, my thought would be that it would probably be easier (at
least as far as setting it up) to simply type dates into the template rather
than use fields and then do a replace when you actually create a document
based on the template. It would be relatively simple to have an AutoNew
macro query the user as to the month and year that would be used and have
that macro do the replace.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
S

Suzanne S. Barnhill

I would do this as a mail merge from Excel. Create a data source in Excel
that can be updated each month (see
http://word.mvps.org/FAQs/MailMerge/CreateADataSource.htm). Each record in
Excel will contain a single field, the date. Excel allows you to insert the
dates via AutoFill and specify weekdays, as follows:

Create a consecutive list of dates
1. Type the first day or date in the list, for example Monday or 6/13/08,
in a cell.
2. Select the cell and use the fill handle to fill a list of consecutive
days.
Note: If you want only weekdays in your list, click Auto Fill Options and
then select Fill Weekdays only.

In your mail merge main document (use a Letter merge), insert a merge field
where you want the date. When you create the merge, you'll get a document
with a page/section for each weekday.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top