Unanswered: Frustration when linking to Outlook 2002
I am currently working on a contact management database in Access using VBA, and wish to link the "Contacts" folder from my Outlook Personal Folders". When I try to link the table via the menus in Access )("File, Get External Data, Link Tables"), Access crashes out.
Going the long way round, I came up with the following code, with the exact same result, Access crashes out, which suggests that the following code is CORRECT (ie: it does the same as working through the menus), so I was kind of hoping if someone had some ideas? Whether I am wrongly assume that this code is correct? or if there is some problem somewhere else (eg: DLL's, ActiveX, etc, etc)
I have deleted and re-created my profile in MAPI, with the same result - the really frustrating part, is that last week when I tried to test that I _COULD_ make a connection, the damn thing worked! Now it doesn't...
Dim dbaDatabase As DAO.Database
Dim tbdDefinition As DAO.TableDef
Dim conString As String
'create database connection
Set dbaDatabase = DBEngine.Workspaces(0).OpenDatabase("v:\vast\vast. mdb")
i have a couple of projects corresponding with outlook data.
i had the same problem as you on some configurations.
i have not solved them, but drew some conclusions:
it occured to me, that access is not "REALLY" working inside the original data (i.e. outlook) but creating a physical copy in some temporary folder. this is bad
what i do now is a programmed synchronisation between access or sql data and code, that actually accesses a public folder, reads contacts or other items and transfers data between them.
i do it by adding the outlook library to the project references and use the procedures of the outlook model
(for example contactitem.add...)
of course it´s more work
but on the other hand I can decide what´s the original and what´s the copy, by the way a thing, the customer was very much agreeing to (like "we use outlook for managing contacts, but we use access for statistics on them")
and it is much more reliable and stable.
i hope, this thoughts are usefull to you and will bring you to new ideas