asked on
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).
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)
Db.run "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 !
ASKER
What I am trying to do is more direct. It is to get an build a limited dataset in memory (VBA in outlook) from access using the DAO method as it seems its the only way I can define a dataset object. Looking at other people who have had the same issue it seems to be down to a DLL library. I think I need access to the Microsoft Office 16.0 Access Database Engine Object Library but when i try to get access I get the following error message:
I have made no other module or project.
Open in new window