¿Cómo conectar una BD de access por VBA de outlook?
Tengo el siguiente código:
Option Explicit
Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim MYMAIL As MailItem
Set MYMAIL = Application.Session.GetItemFromID(EntryIDCollection)
Dim MYSUBJECT As String, MYSENDER As String, MYTIME As Date
MYSUBJECT = MYMAIL.Subject
MYSENDER = MYMAIL.SenderEmailAddress
MYTIME = MYMAIL.ReceivedTime
'..............................................................................................................
Dim STR As String
'INSEERT INTO TABLENAME(FIELD1,FIELD2)VALUES(100,JUAN)
STR = "INSERT INTO CONTROL_EMAIL(EMAILSUBJECT,EMAILSENDER,EMAILDATE)VALUES(" & "'" & MYSUBJECT & "'" & "," & "'" & MYSENDER & "'" & "," & "'" & MYTIME & "'" & ")"
Dim CNX As ADODB.Connection
Set CNX = New ADODB.Connection
CNX.Provider = "Microsoft.ACE.OLDEB.12.0"
CNX.ConnectionString = "C:\Users\jfg93407\OneDrive - GSK\Desktop\BaseOutlook.accdb"
CNX. Open
CNX. Execute STR
End Sub
...
Pero en el momento de hacer esta acción "CNX.Open" me arroja el siguiente mensaje, "¿Run-time error '3706'. Provider cannot be found. It may not be properly installed" ya descarqué el complemento "AccessDatabaseEngine_x64" ...