I am trying to access the inbox from Outlook from Access.
I found this code, but when I run it I get A message
Error 3170 Couldn't find installable ISAM.
Any suggestions?
Function AttachMail()
Dim db As Database
Dim td As TableDef
On Error GoTo Errorhandler
Set db = CurrentDb()
Set td = db.CreateTableDef("tblInbox"
' Substitute your own MAPILEVEL, DATABASE and PROFILE arguments.
td.Connect = "Exchange 4.0;MAPILEVEL=Mailbox - Nancy Davolio|;"
td.Connect = td.Connect & "DATABASE=C:\Program Files\Microsoft "
td.Connect = td.Connect & "Office\Office\Samples\Northwind.mdb;"
td.Connect = td.Connect & "PROFILE=Microsoft Outlook"
' Substitute the name of the folder you want to attach.
td.SourceTableName = "Inbox"
db.TableDefs.Append td
Application.RefreshDatabaseWindow
MsgBox "Table Appended!"
Exit Function
Errorhandler:
Msgbox "Error " & Err & " " & Error
Exit Function
End Function
I found this code, but when I run it I get A message
Error 3170 Couldn't find installable ISAM.
Any suggestions?
Function AttachMail()
Dim db As Database
Dim td As TableDef
On Error GoTo Errorhandler
Set db = CurrentDb()
Set td = db.CreateTableDef("tblInbox"
' Substitute your own MAPILEVEL, DATABASE and PROFILE arguments.
td.Connect = "Exchange 4.0;MAPILEVEL=Mailbox - Nancy Davolio|;"
td.Connect = td.Connect & "DATABASE=C:\Program Files\Microsoft "
td.Connect = td.Connect & "Office\Office\Samples\Northwind.mdb;"
td.Connect = td.Connect & "PROFILE=Microsoft Outlook"
' Substitute the name of the folder you want to attach.
td.SourceTableName = "Inbox"
db.TableDefs.Append td
Application.RefreshDatabaseWindow
MsgBox "Table Appended!"
Exit Function
Errorhandler:
Msgbox "Error " & Err & " " & Error
Exit Function
End Function