Hi Tom
For a start, DO NOT try to do this by embedding a Word document.
There are two possible approaches, both involving the automation of Word
(calling up its functionality from within Access).
The first is to create a Word template with bookmarks in it at the places
you want the values from your database fields to be filled in. Your code
then creates a new document based on the template, and goes through it
substituting the field value for each of the bookmarks. Then it saves
and/or prints the resulting document. This approach is best for doing a
single record at a time.
The second approach is to create a mail merge master document, containing
merge fields corresponding to your data fields. This approach is best for
generating many letters from a selection of your data. Word can merge
directly from an Access query as its data source, but personally I thing it
is preferable to export the query data set as a delimited text file, and use
that as the merge data source. Your code needs to export the data to a
temporary file, open the Word merge master, set its merge data source, and
then perform the merge, either to a new document which can be edited and/or
saved, or directly to a printer.
Albert Kallal has some example code here:
http://www.members.shaw.ca/AlbertKal...rge/index.html
--
Good Luck :-)
Graham Mandeno [Access MVP]
Auckland, New Zealand
"njem" <njemtcan-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've worked with Access in years past and just getting up to speed on
> 2007. I've been reading reams of help files and trying various ways
> for hours to make a simple form. I need to pull up a person in the db,
> click a button and print one of a list of form letters (reports) to
> that person. I've tried creating a letter in Word and embedding it.
> Even when I set it "to fit" it is reduced in size. If I stretch it it
> looks funny. Regardless I then need to overlay field boxes everywhere
> they're needed and try to get them to align with the letter. This also
> means fields can't have any following text on that line because the
> letter text isn't going to adapt to the field length.
>
> I'm sure I could create a macro to export the selected data to a text
> file that Word could use as a merge source, but there are about 100
> different letters. So the operator would need to run the export macro,
> switch to Word, open the correct letter, merge, then back to Access.
> Not very workable to do many times a day in rapid succession.
>
> I really hope I'm missing some easy way to do this. Any suggestions?
>
> Thanks,
> Tom
>
> Originally posted in "forms".
>