Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006

    Desperately need code to automate Access 2003 from Word 2003

    I have a Word document that is filled with data. I set up a button on the document where the user is supposed to click on the button and run VBA code. The code is supposed to open an access database and run a select query and then insert new data into the access database. The database is in the same directory as the document. I am limited to starting it from Word with the button. The button works and runs the VBA. I just don't know what to use to get the database open and queried. Help would be greatly appreciated. thanks.

  2. #2
    rayc is offline Novice
    Windows XP Access 2002 (version 10.0)
    Join Date
    Dec 2005
    Montreal, Canada
    The solution is not trivial unfortunately.

    What I would do is add a reference to the Microsoft Access Object Library within your VBA code in Word, and then open an instance of Microsoft Access, then use commands such as OpenDatabase(), etc. to do your stuff. From there, you would populate tables, run queries, etc.

    Hope this gives you some direction.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 11-10-2008, 12:35 PM
  2. Microsoft Access 2003-Missing Records??
    By kristenlee in forum Access
    Replies: 1
    Last Post: 04-04-2008, 06:43 PM
  3. access 2003 automation issue
    By BevA in forum Programming
    Replies: 2
    Last Post: 05-01-2006, 08:37 AM
  4. Replies: 1
    Last Post: 04-05-2006, 01:58 PM
  5. Help! Newbie needs help with Access 2003!!!
    By infernojericho in forum Access
    Replies: 0
    Last Post: 12-03-2005, 08:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Other Forums: Microsoft Office Forums - Senior Forums