Passing variables to a Word Doc.

techexpressinc

Registered User.
Local time
, 21:48
Joined
Nov 26, 2008
Messages
185
I am trying for the 1st time to pass Access variables to a Word document.

I used this as a starting point http://support.microsoft.com/kb/260410

It seem fairly straight forward.

I made a little db with one table - one record - and I am attempting to have it pass the data and open a Word document.

Without success.

Attached are files that show the works.

My Access DB
My instructions on how to with the marco code i am trying to use


Thanks for any pointers.
fyi - Office 2003 for the software - Russ
 

Attachments

I am trying for the 1st time to pass Access variables to a Word document.

I used this as a starting point http://support.microsoft.com/kb/260410

It seem fairly straight forward.

I made a little db with one table - one record - and I am attempting to have it pass the data and open a Word document.

Without success.

Attached are files that show the works.

My Access DB
My instructions on how to with the marco code i am trying to use


Thanks for any pointers.
fyi - Office 2003 for the software - Russ

You have the code repeated in the Module sheet, you must also set the reference to Microsoft Word in the VBA screen.

I have commented out repeats. It will work once you set the references as well, The database is returned here
 

Attachments

Thx I will give a try and let you know how it goes.
Russ
 
Ok when I looked at the database I was using 2007 and you must be using a lower version like 2003, therefore the Reference in the VBA is stating that you have MISSING REFERENCE, so use alt + F11 on the keyboard, select the Tools Menu then select References it will say MISSING Microsoft Word 12.Object Library.

Take the tick out the box and then scroll down the list until you find Microsoft Word (A Number like 11).Object Library, tick the box, save the module and then try and run your program.
 
Trevor - Thanks a million!
I think i am up and going. At least the Word document is popping up with some of the fields getting loaded.
It was a bit tricky getting the MS Word object to load - you need to do it in the right place. Which is like in the Visual Basic screen Tools not the main MS-Access screen Tools, the reference option is different.
Thx again for the help and digging into it.
Russ
 
Glad to read your working with it OK now Russ
 

Users who are viewing this thread

Back
Top Bottom