I need to be able to maintain Outlook Contacts from Access. Does anyone know of any code out there that will do this?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Access to Outlook (Access )
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Access to Outlook (Access )
- This topic has 23 replies, 4 voices, and was last updated 23 years, 7 months ago.
AuthorTopicWSMarkLiquorman
AskWoody LoungerOctober 13, 2001 at 8:29 pm #361499Viewing 0 reply threadsAuthorReplies-
WSRupert
AskWoody LoungerOctober 13, 2001 at 8:40 pm #546616Have you looked at
Helen Feddema site? -
WSMarkLiquorman
AskWoody LoungerOctober 14, 2001 at 12:30 pm #546660Yeah I did, her code49. The sample Outlook template it included could not be read by Outlook, I got “Not a valid property of this object” errors in her code when she tried to use the Outlook Object she defined, and even if it could work, it still only dumps the Access table into Outlook. There is no means to detect if a record already exists to be able to update it rather than create a duplicate.
-
WBell
AskWoody_MVPOctober 14, 2001 at 1:17 pm #546663The version of Office you are useing makes a considerable difference in whether Outlook OLE Automation works well or not. Outlook 2000 is much more friendly than 98 – but neither is a piece of cake when it comes to working with Access. The problem is that Outlook basically uses a flat file with delimiters to store all of the data about a contact. That said, the task is not insurmountable.
You have to do it all in code, and it is fairly complex. The process essentially involves creating Add, Edit and Delete processes, and the code to get and display the various contact information in forms. We are in the process of doing something similar using Exchange Server. I believe there is some information about how to tackle this in the Getz et al Developers Handbook, and there are several white papers available in the MS knowledge base. Bottom line – it isn’t trivial.
-
WSMarkLiquorman
AskWoody LoungerOctober 14, 2001 at 3:37 pm #546670Unfortunately there is nothing in Dev. Handbook (97 version anyway). I’ve seen other code for adding a contact that worked, but I haven’t seen any code that worked (the one I saw didn’t work) for checking to see if an entry in Contact file already exists. Also, in your experience, can an Outlook Contact be updated, or is it better to delete/add?
-
WScharlotte
AskWoody LoungerOctober 14, 2001 at 3:53 pm #546671Mark, which version of Outlook are you using? For everything prior to Outlook 2000, the Outlook scripting language was VBS, not VBA, so that might be where you’re running into problems. There were articles in Access-VB-SQL Advisor (http://www.advisor.com) and Smart Access (http://www.smartaccessnewsletter.com) on Access and Outlook in the earlier versions, so you might try looking through their indexes, although you’ll have to buy the articles unless you have the mags at home.
-
WSMarkLiquorman
AskWoody Lounger -
WScharlotte
AskWoody LoungerOctober 14, 2001 at 9:07 pm #546699Yes, Outlook98 was an in-between version that cured some of the Outlook97 problems, but of course had a different object library name.
I would expect any code for Outlook 2000 to use VBA rather than VBS, but if she’s using the object libraries, there’s a lot you can do with Outlook without having to resort to VBS. Unfortunately, it isn’t as much as you might wish, and any given version exposes different methods and properties, so the code probably isn’t at all backward compatible with 97.
She used to have 97 stuff on her site as well, so you might be able to find something more suitable if you look for it.
-
WSMarkLiquorman
AskWoody LoungerOctober 15, 2001 at 12:04 am #546717>>Yes, Outlook98 was an in-between version that cured some of the Outlook97 problems, but of course had a different object library name. <<
Of course! why make this simple! It looks like I'll have to follow through on my threat to load-in Office2000, now that I've gotten a friend to use RoadRunner to download all new latest SR and SP. I try to stay no more than 1 release behind.
-
WBell
AskWoody_MVPOctober 14, 2001 at 5:41 pm #546675You are correct about not being able to check to see if the person already exists, but there is a trick. To make sure you have consistency, you only allow updating from Access – i.e. no updates from Outlook. Second, you use one of the spare Outlook “fields” to store a unique identifier, and you use that as your look-up source. In other words, you use Access to check for duplicates in its tables before you ever start an OLE session with Outlook. I seem to remember that you use Office 97 primarily, and that limits what you can do from Outlook anyhow.
As a starter, you might look at ">Q168095 on the Knowledge base. There are some other white papers that go into more detail that I haven’t been able to locate, but I’ll dig later today and see if I can’t find them.
-
WSMarkLiquorman
AskWoody LoungerOctober 14, 2001 at 8:19 pm #546691>>You are correct about not being able to check to see if the person already exists, but there is a trick<<
I'm wasn't sure about checking for duplicates in Outlook. I did have some code I got from somewhere else that purported to check for duplicates, but it is apparent that the check didn't work because I was able to consistently add duplicates from Access to Outlook. I am using Office97, but my client is using OfficeXP, if that would make a difference in what I can do. I'l check-out those MSKB references to see what I can understand. Thanks.
-
WBell
AskWoody_MVPOctober 15, 2001 at 11:55 am #546776We haven’t tried to do any OLE Automation with Outlook 2002, so there may be some object model changes between Outlook 97/98 and it. We did find some nasty wrinkles with Word 2002 Mail Merges being automated from Access when security is active. I also found a knowledge base article that gives some example code for working with Outlook 2002 – Q291120.
There are a couple of other useful examples in Scott Barker’s Access 2000 Power Programming on pages 460-470 and in the 2000 version of the Developer’s Handbook on pages 953-961 – the latter is working with the Journal rather than contacts, but the principles are the same. Hope all this helps some – it is not a trivial task.
-
WSMarkLiquorman
AskWoody LoungerOctober 15, 2001 at 12:39 pm #546779Thanks, I’ll dig into it some more. I’ve got to come up with way to handle this, since the client needs the information in both my system and in Outlook, and to be able to do it with minimal effort. (for example, if a new customer walks in the door, the should be able to quickly enter the customer name into Access and have it automatically added to Outlook Contact list when they create an invoice).
One more thing though. Do you know if it is possible to update the Contact information from Access? Everything I’ve seen so far deals merely with adding an entry. I suppose I could Delete/Add, but I don’t know what effect that will have on other related entries in Outlook.
-
WBell
AskWoody_MVPOctober 15, 2001 at 6:47 pm #546855Yes, you can update the Contact information using any of the appls that support OLE Automation. It’s basically the same process as adding a new item, except you have to find the record you want and then change the appropriate fields. But in your case you may just want to do a delete and an add rather than coding logic to see what info has changed. That could get pretty hairy. There is a reasonably detailed article in the Knowledge Base, Q302460, that points to an Automation Help File that has some detailed info about taking an Access Database and creating contacts from it.
I got to thinking about your problem, and I assume it is a multiple user environment, in which case you will need to be using Exchange Server in any event. Outlook PST files don’t like to share at all. Hope this helps.
-
WSMarkLiquorman
AskWoody LoungerOctober 16, 2001 at 12:48 pm #546981Thanks, I’ll check out that MSKB article. I just loaded Office2000 Developer on my laptop, and as soon as I’m sure it doesn’t interfere with O97 I’ll do it on my desktop. The only potential problem is that there can only be 1 copy of Outlook on the computer (which can be sticky on if I need to do this interface in 2 versions of Office).
I think I downloaded what is necessary to link to Outlook Contacts through Exchange; at least when I create a new linked table, “Exchange” shows up on my file-type list. However, as I understand it, you can’t update information in a table linked this way?
-
WBell
AskWoody_MVPOctober 16, 2001 at 2:15 pm #546996I fear Office2K may have replaces your Outlook 97 – it seems to me when I tried to run a dual office machine it told me there wasn’t any choice, but that’s been 2 years ago, and at my age memory was the second thing to go – can’t remember what the first was. I believe you are correct regarding the updating of Exchange “tables” linked via ODBC.
Developing this to run on two different versions of Office in the same application could be a major league challenge. If possible, convince them to go to a single version – either 97 or XP. For one thing, XP is going to want to convert your database every time you try to run the application. And linking to a 97 backend from an XP front-end is generally trouble with a CAPITAL T. Performance suffers quite a bit, and we had corruption problems with the back-end.
-
WSMarkLiquorman
AskWoody LoungerOctober 16, 2001 at 3:14 pm #547017>>I fear Office2K may have replaces your Outlook 97 <<
Yes it did, but it did warn me that it was going to do that (apparently Outlook is only Office component for which only 1 version is allowed). It's not really a problem, since I don't use Outlook anyway, and I've only got it loaded for this one situation I'm working on. And since client uses XP, I'll be converting some on-site anyway.
-
WSRupert
AskWoody Lounger -
WSMarkLiquorman
AskWoody Lounger -
WSMarkLiquorman
AskWoody LoungerOctober 19, 2001 at 1:38 am #547587
-
-
-
WSRupert
AskWoody Lounger -
WSMarkLiquorman
AskWoody Lounger
-
-
WSRupert
AskWoody Lounger -
WSMarkLiquorman
AskWoody LoungerOctober 14, 2001 at 8:14 pm #546690>>BTW, Looking at your problem simply. Could you export the Outlook contacts, work on them in Access and then put them back?<<
The information in Access are the Customers in an Invoicing application, so the info has to reside there, otherwise I lose referential integrity. I can add a Customer to Contacts, but once it is there I either have to be able to update it or just delete it and re-add (though I don't know what consequences of this are).
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
1 hour, 50 minutes ago -
No Screen TurnOff???
by
CWBillow
2 hours, 12 minutes ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
2 hours, 44 minutes ago -
InfoStealer Malware Data Breach Exposed 184 Million Logins and Passwords
by
Alex5723
14 hours, 21 minutes ago -
How well does your browser block trackers?
by
n0ads
39 minutes ago -
You can’t handle me
by
Susan Bradley
5 hours, 4 minutes ago -
Chrome Can Now Change Your Weak Passwords for You
by
Alex5723
7 minutes ago -
Microsoft: Over 394,000 Windows PCs infected by Lumma malware, affects Chrome..
by
Alex5723
1 day, 1 hour ago -
Signal vs Microsoft’s Recall ; By Default, Signal Doesn’t Recall
by
Alex5723
5 hours, 13 minutes ago -
Internet Archive : This is where all of The Internet is stored
by
Alex5723
1 day, 2 hours ago -
iPhone 7 Plus and the iPhone 8 on Vantage list
by
Alex5723
1 day, 2 hours ago -
Lumma malware takedown
by
EyesOnWindows
14 hours, 28 minutes ago -
“kill switches” found in Chinese made power inverters
by
Alex5723
1 day, 11 hours ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
1 day, 10 hours ago -
Meet Gemini in Chrome
by
Alex5723
1 day, 15 hours ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
1 day, 15 hours ago -
Trump signs Take It Down Act
by
Alex5723
1 day, 23 hours ago -
Do you have a maintenance window?
by
Susan Bradley
3 hours, 47 minutes ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
1 day, 1 hour ago -
Cox Communications and Charter Communications to merge
by
not so anon
2 days, 2 hours ago -
Help with WD usb driver on Windows 11
by
Tex265
10 hours, 49 minutes ago -
hibernate activation
by
e_belmont
2 days, 11 hours ago -
Red Hat Enterprise Linux 10 with AI assistant
by
Alex5723
2 days, 15 hours ago -
Windows 11 Insider Preview build 26200.5603 released to DEV
by
joep517
2 days, 18 hours ago -
Windows 11 Insider Preview build 26120.4151 (24H2) released to BETA
by
joep517
2 days, 18 hours ago -
Fixing Windows 24H2 failed KB5058411 install
by
Alex5723
1 day, 14 hours ago -
Out of band for Windows 10
by
Susan Bradley
2 days, 22 hours ago -
Giving UniGetUi a test run.
by
RetiredGeek
3 days, 5 hours ago -
Windows 11 Insider Preview Build 26100.4188 (24H2) released to Release Preview
by
joep517
3 days, 13 hours ago -
Microsoft is now putting quantum encryption in Windows builds
by
Alex5723
1 day, 9 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.