VB 6.0 - Visual Basic DIM code to upload Access 2007 DB values to Word 2007

Asked By Don DiPalma on 04-May-10 01:55 PM
Help,
I am running Access 2007 and Word 2007.  I had initially created a database in Access 2003 format and wrote VB code to upload DB values to bookmarks in a Word 2007 document and it works fine.  When I converted the database to Access 2007 format the VB code does not work.  The error is in my Dim statement "Dim wordobj as Word.Application". When I compile the code in Access 2007 it gives me the error "Compile error: User-defined type not defined".  Is there a different Dim that I need to reference?  Thanks
al replied to Don DiPalma on 04-May-10 03:21 PM
Add a reference to Microsoft word 12.0 object library to your code.
Don DiPalma replied to al on 04-May-10 03:58 PM
not sure how to do that.  do you have an example?
al replied to Don DiPalma on 05-May-10 09:03 AM
In access 2007, do the following after opening your database

Database tools->Visual Basic->Tools-> References

Scroll down the list until you see the entry for Microsoft Word.

Check the box