[AccessD] Mail Merge

William Hindman wdhindman at bellsouth.net
Sat Sep 27 00:03:55 CDT 2003


...good god JC ...how do you always come up with such ball busters? :)

...replies in-line ****

...the persnickety Mr. H :)

----- Original Message ----- 
From: "John Colby" <jcolby at colbyconsulting.com>
To: "AccessD" <AccessD at databaseadvisors.com>
Sent: Friday, September 26, 2003 9:49 PM
Subject: [AccessD] Mail Merge


> OK, my client's mail merge project is getting off the ground and I have no
> experience at this and I need some info.
>
> Background: (How I envision it)
>
> The system will allow the user to select contact info - name / address /
> phone from up to 3 different tables, placing the selected contact info
into
> a local table in the FE.  One address will be designated as the "To"
> address, with all others CC addresses.
>
> This info will be used to build up a merged document with info such as
claim
> number, claim info etc.  The "TO" address will be embedded in the document
> along with the other data.  However many addresses are selected will
> determine the number of copies of this document printed.
>
> A second document will be printed with only the address info, this to be
> used to slide into the envelope window to get the "CC" copies to the right
> place.
>
> The user can select the document they wish to send as part of this
process,
> i.e. there will be a combo that pulls all the document names out of a
> directory and allows selecting which document to send.
>
> I will create a query for each document, and (preferably) the document
knows
> what query to use to pull the data.  The queries will in all cases be
> filtered to a specific claim simply because they are on that claim when
they
> click on a tab to do this mail merge process.  IOW, they go to (actually
> live in) the claim form which already has many tabs displaying child info
to
> the claim.  I will be adding another tab that allows them to select the
> document to merge, the people to send the doc to and then press a button
> that fires off a process to do it all.
>
> Questions:
>
> * Can I open a mail merge document and cause the merge to happen, but
leave
> the doc open to allow edits?

****yes ...build your template docs and store them as .dot files in a common
directory ...use the templates to create the mail merge but mail merge to a
new document ...the new document is then no longer connected to the db or
the template and can be edited to their heart's delight without screwing up
anything you built. I do this all the time.

> * Can I lock specific areas of the document so that those areas cannot be
> edited?

****yes and no ...you can use Protect Document to make entire sections
uneditable by users ...but that requires a separate section each time you
want to change the edit/lock status ...or you can lock individual merge
fields but that won't carry forward to a "new" merge document without some
code I've never seen ...not tried to do this except in very limited
circumstances so others may know of a solution I'm not aware of :)

> * Is the merged data ever editable?  I may need to lock some but allow
other
> merged data to be edited.

****yes if you merge to a new doc per above comments ...but then I don't
know of a way to carry locking forward :(

> * Assuming I can do that, can I then tell the document (Or Word) to print
N
> copies of the document where N may change from day to day.  IOW, I do not
> want the user to have to remember (or even have to know) how many copies
to
> print.  So the doc opens, they edit it, then somehow say "print" or
"Cancel"
> but I have already told Word how many copies to print if they hit the
print
> button.

****I control this from within Access ...never tried it from within word but
the W2K VBA is much more versatile than earlier Word versions so its very
likely possible.

> * After that document closes I need to know if the user actually printed
the
> N copies of the document or canceled out (closed word without printing?)
so
> that if they did print, I can then print N-1 copies of the address
document
> for the windowed envelopes.  How do I know if the user printed or canceled
> without asking them as they come back to Access?

****afaik, this depends upon the printer driver ...if you have a fairly new
printer with bidirectional communications you can get this info in Word
...the new Access Printer Object can do this as well.

> * Can I somehow prevent saving the document?  They have no use for the
> document itself after printing and I specifically don't want them saving a
> merged document back over the top of the original "Template".  I suppose I
> could brute force that by setting a Read-Only attribute on the hard disk
but
> would prefer to somehow disable the save button in Word.  I guess what I
> really want is to disable the menus and toolbars in Windows and enable a
> custom toolbar of my own or something like that.

****make the template Read Only ...you don't really want to disable the Save
button since they may need to do it if their work in progress is interrupted
for any reason ...but you can throw up a custom dialog that makes the case
clearer to them.
>
> Has anyone ever done this stuff specifically, REAL specific help on how to
> do this?  I can handle the Access side of things but don't know anything
> about how to make Word do what I want.

****I use Word merge all the time but to be candid I'd do something like
this as an Access report and then save it as a Word document ...Word just
has too many little gotchas and places that the user can screw you over too
easily for my tastes ...but if you have any specific questions, you know
where I am :)
>
> TIA,
>
> John W. Colby
> www.colbyconsulting.com
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>




More information about the AccessD mailing list