I can't believe how much trouble I am having creating a button on a form that when click will open a word doc and write data fields from the form to the word doc. I have read over 40 threads of this and tried over 15 different methods and have come up with squat. I would appreciate anyone who can help me get through this. Here is the goal:
I have a form with an organization_name field (and other fields but lets keep it simple) that is open to a record. I need to print a long waiver/legal type document that has several references within the time to the organization_name field. I am familiar with doing a mail merge but my goal is to have a button that will open the waiver.doc and populate the fields sot that I can print it (printing doesn't need to be automated). Going through the process of mail merge isn't desirable as I have to do this 300+ times a month.
Here's what I have tried and failed with:
I have tried doing this through access reports. It doesn't work bc the waiver is several pages long.
I have tried the method of creating a button that runs a vb code to open the doc and write the field to bookmarks. It always fails at Dim myApp As Word.Application with error code: User defined type not defined. I have the Microsoft Office Library 14.0 referenced in references. When i try to reference DAO as suggested to me it comes up with some kind of duplicate name error.
Any ideas that I can try? It seems like this should be an easy thing but I feel like I'm asking the moon and stars.
