HDI: Create a Batch Letter Module?

  • Thread starter Thread starter C Hayes
  • Start date Start date
C

C Hayes

I'm trying to devise a way of producing a batch of letters to be printed at
the end of the day from an access database.

I'm not familiar with classes in vba (I know a little about them in .net but
that's VERY limited and I understand vba has limitations in reference to
oop.) I was thinking about making a class that would handle this in
conjunction with a table that would identify letters to be printed and what
letter to print for each instance.

A little bit about my senario:
Access Database keeps and maintains Contribution information from donors.
Each contribution is thanked (word document) and some contributions require
additional letters to be created (and envelopes). Currently using Kahal's
wordmerge tool (works great) but I would like to process them all at the end
of the day (or week)

I'm open to suggestions on an approach to this situation in general.
 
On Thu, 24 Jan 2008 08:25:01 -0800, C Hayes

This probably requires a new table, say "LettersToPrint", which during
the week gets filled with work to do. Then when you click the magic
button your code will loop over these records, generating the needed
letters. At the end of the process it could delete the records, or
mark them as Completed.

-Tom.
 
It should be noted that you can use a query, and NOT have to use a form's
datasouce for my merge.

As commented, it very possible you simply build up a table with the document
name + record id (primary key").

You then build a "loop" in code that sorts by the documents, and creates a
data source you send to the merge.....

(I am kind of re-interating Tom's suggestion here)...

eg:

loop for each document in our tblMailing

strSql = "select * from tblCustomer where id in (select id from
tblMail where docName = '" docname & "')

MergeAllWord strSql

next docuemnt
 
Albert,

First, your word merge module has been a big help to me and I'm sure others.
Along with a simple useful interface, the code behind is a wealth of
training information for novice programmers like myself.

I ended up taking your advice along with the fact that you have a function
to MergeNoPrompts.

I created a table for letters to print. I had a 'printed' boolean field to
eliminate them from the list once printed. I looped throught a totals query
that grouped my the letters by 'lettername' which originates from the letters
the user selected for each donation. In this loop i basically just run your
MergeNoPrompts function. Works like magic!!

Your solution seems to have a lot of possible avenues!

Thanks you all for your support to the community!!
 
Back
Top