[Webinar] Streamline your web hosting managementRegister Today


Populating a Microsoft Word Document from Microsoft Access VBA

Posted on 2017-09-12
Low Priority
Last Modified: 2017-10-01
I have an Microsoft Access Application that generates a contract using Microsoft Access reports.  I would like to setup contract templates in Microsoft Word and then use Microsoft Access VBA to export data to the contract and the Word document needs to be locked.  

I know how to code in VBA to export data to Excel, but I have never done it to Microsoft Word.  Also, I have never setup Word Document templates with fields.  

Can someone help point me in the right direction?  

Question by:Marilyn
  • 2
LVL 40

Expert Comment

ID: 42291395
Try to consider other approach - create word merge document with the source - Access table with prepared data. You can open nesessary template from Access

Author Comment

ID: 42291400
Ok, thanks.  I'm going to investigate setting up a word merge document.
LVL 41

Accepted Solution

PatHartman earned 1000 total points (awarded by participants)
ID: 42291507
Mail Merge is too limiting.  I've attached a database that shows a basic example of how to do this along with two letters.  On the sample form use the button for the path field to locate the document you want to fill.  For simplicity, all the fields you are filling are hard-coded but this is easy enough to do with tables if you want something more sophisticated.  I have one app used by an insurance company that fills thousands of different documents.  And NO CODING is required to create a new document and link it in to the app.  In fact, the users do it themselves.

Sorry - it's too big to upload.  Please send me a PM with your email and I will send it to you.  Do NOT post your email in this thread.
LVL 41

Expert Comment

ID: 42314626
I sent the sample via email since it was too large to post on the EE site.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have had my own IT business for a very long time. I started mostly with hardware and after about a year started to notice a common theme. I had shelves with software boxes -- Peachtree, Quicken, Sage, Ouickbooks -- and yet most of my clients were…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Get the source code for a fully functional Access application shell with several popular security features that Access VBA application developers desire, but find difficult or impossible to figure out how to code. You get the source code for managi…
Suggested Courses

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question