Create fax cover letter from MS Access VBA

Not sure where to begin, but I would like to create a fax cover letter from my access application.  I am thinking I should do this with a Word Tempalte (.dot file) and open from access VBA, but I can't seem to get my head around how I would populate the template with the current records information (e.g. name, fax number, etc).  Does a template have field place holders that can be set from VBA?  Or is there a better way?  I thought about creating a report, but you can't manually enter text after you create a report.  I thought a word document would be better path.  Any help is appreciated!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Actually, an Access report would be the fastest (and probably easiest).  
Create a query of your data (placed on the report) and design the report to suit your needs.

If you send to Word, you would still need the query, but you will have to setup a Word doc as a Mail Merge.  Set the source to the Access query, and populate the fields in the Word doc to the query fields.

Since you have to print this out (for fax cover letter).... might as well print it from an Access report.

Scott C.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

If you use Word, you will have to RUN Access to get the query.

I have a system that the user selects a record from a form, clicks a button, and Word opens with the required merge data.

Create a global variable in Access
Global glbRecID as long

Create a function to return this variable

Function get_glbRecID() AS LONG
get_glbRecID = glbRecID
End Function

Create a query and set the criteria to the function

query column RECID
= get_glbRecID()

In the form, create a button that assigns a value to glbRecID
Sub Button_click()
if not isnull(me.RECID) THEN
    glbRecID = me.RECID
    '------ SHELL to Word doc.  Word will open the document and link to this query
end if
End Sub

I still think the Access Report is easier.....

Scott C.

burtonrhodesAuthor Commented:
I think you may be on the right track.  I was trying to stay away from a Report since the user couldn't type a personal message after the report was created...however, I could just have them type the custom message in a form before thereport is created.  Easy enough.

Many thanks.
If you include a memo field in your data table - you could supply a form textbox and allow the user to type in what they want.  Bind this field to your report and BINGO......

You could (in code) clear the memo field upon closing (so not to waste space saving this text)......

Scott C.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.