Consuming Custom Contact DataSource in Outlook 2003

Was just doing some research into integrating a custom Contact list with an external datasource (eg: From a SQL Database), and came across this excellent post by Stephen Toub titled Outlook Contact Provider.

I thought it was quite interesting, what Stephen has managed to do is making use of the stssync protocol to synchronise the data. Although the stssync protocol (I believe) was designed to work with WSS (there’s a file called WssListResponse.cs that’s worth looking at), this solution does not require Windows Sharepoint Services (WSS) installed on the server. It does however, require you to have Microsoft Outlook 2003 installed on the client.

For a bit mroe detail/introduction to what Stephen is trying to achieve here, have a read of this article on MSDN that he wrote titled Custom Calendar Providers for Outlook 2003.

From the above article:

With Outlook 2003, Microsoft introduced functionality that allows Outlook to talk to a server running Windows SharePoint Services. Outlook is able to link to and consume various lists published on a SharePoint site, such as event and contact lists, a feat made possible through a Web service that lives in Windows SharePoint Services. Outlook can download event information from an events list on a SharePoint site and display it as a calendar within the Outlook application, side-by-side with the user’s default calendar as well as calendars from other Exchange users.

So what if I want to display my own event-based data, rather than that which is stored in a SharePoint list? I see two options that take advantage of this interaction between Outlook and Windows SharePoint Services. Just as Outlook provides an object model for its calendaring capabilities, so does Windows SharePoint Services. The first solution is to write an application that continually updates a SharePoint events list with data from the back-end data source. Outlook could then connect to this list. This requires that I have a server running Windows SharePoint Services and that I have an application running frequently or constantly to update the list, either using the Windows SharePoint Services object model (if the application is running on the Windows SharePoint Services server) or using one of its Web services (if the application is running remotely from the Windows SharePoint Services server).

An easier solution, and one that I believe has many advantages, is to build my own Web application that looks to Outlook similar to Windows SharePoint Services but that actually serves up my custom data instead of that from an events list. This doesn’t require Windows SharePoint Services to be installed, is easily maintainable, provides for great extensibility, and best of all requires nothing to be installed on the client besides Outlook 2003 itself. On the server, all I need is ASP.NET (and thus the “server” can be the same computer as the “client”, even if the computer isn’t running Microsoft Windows Server® 2003, which is required for Windows SharePoint Services) and a little bit of custom code to shim the Lists Web service (available from Lists.asmx) from Windows SharePoint Services.

Hope others may find this useful too.

This works well if you’ve got a database for your own web app that also contains contact information that you want integrated with Outlook.

What actually happens is that a special Sharepoint folder gets added to Outlook which contains your contacts. It’s a bit like an Exchange public folder. The custom contacts folder allows you to do anything to it like any regular Contacts list, and you can refresh it with new data from the web service.

Comments are closed.