troubleshooting Question

I need to write to a table in access from outlook to use as a log when an email is received and attachment spreadsheet saved (or not saved).

Avatar of Anton Fernando
Anton Fernando asked on
Microsoft OfficeMicrosoft AccessOutlookVBA
3 Comments1 Solution10 ViewsLast Modified:

Reading the various web pages on the internet it seems that you can use VBA in all the main office applications providing you have the correct DDL /references connected. With this in mind, I wanted to make outlook when it received a particular email would save the attached spreadsheet and then get MSaccess to load the tables in it. This all now works. 

The connection I made between Outlook and access was based around  

Dim Db as access.application 

set Db = getobject( Database filepath&name.accdb) "AccessMacro"

This works so I thought I would try to access a record set so using a dao connection I did the following :

Dim db As DAO.Database
Dim rstRset As DAO.Recordset

Set db = OpenDatabase("D:\Access\TestDAOLinkWithOutLook.accdb")

This code works with access to access connection, but failed with outlook to access.


 I get this error.  

What am I missing ?? Is it a referrence DDL ? This is a vital point I need to get past before I can get my hands on the recordset and start adding/changing  it.

Thanks in anticipation !

Anton FernandoNetwork analysist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros