Multiple dated documents

K

KeithG59

I have an Access database from which I take data for a mail merge. I then
have to produce a number of forms to fill in over a period from 1 to 4 weeks,
excluding sundays. Is it possible to take a start date from Access and print
the required number of forms, say between 5 and 21? If so, is it also
possible to print the required dates on the forms? Even more prtinently, how?
Any advice would be appreciated.
 
D

Doug Robbins - Word MVP

If the dates are in the database, it would seem to be a case of just merging
the required number of records.

I would still suggest however that you investigate doing the whole thing in
the database.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
K

KeithG59

Each record has [some information] and fields for [start date] and [end
date]. It is the number of days between the start and end dates for which I
need to generate forms. Whilst it would be useful to date the forms
individually for each day of the period, I will be happy with being able to
generate the correct number of forms. Although DATEDIFF will tell me how many
days, I am not sure what to do with that information to generate the correct
number forms.
 
D

Doug Robbins - Word MVP

I don't think that you will be able to do this with Mail Merge. There is no
doubt that it could be done using VBA to control Word from Access or vice
versa. I would use DOCVARIABLE fields in a template in Word from which you
have the code create the new documents, and set the value of the Document
Variables with the data contained in Access.

You would use DateDiff to determine the number of documents to be created
and for each successive one, you would use DateAdd to the appropriate number
of days, i.e. 1 or 2 depending on whether the next day is a Sunday or not.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

KeithG59 said:
Each record has [some information] and fields for [start date] and [end
date]. It is the number of days between the start and end dates for which
I
need to generate forms. Whilst it would be useful to date the forms
individually for each day of the period, I will be happy with being able
to
generate the correct number of forms. Although DATEDIFF will tell me how
many
days, I am not sure what to do with that information to generate the
correct
number forms.

Doug Robbins - Word MVP said:
If the dates are in the database, it would seem to be a case of just
merging
the required number of records.

I would still suggest however that you investigate doing the whole thing
in
the database.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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