• Insights

Connecting SharePoint libraries to Outlook with stssync

Kraft Kennedy

2 min read

All Insights

Outlook 2003 and 2007 support a protocol called stssync, which allow SharePoint libraries to be viewed in Outlook.  Outlook 2003 allows for read-only viewing, whereas Outlook 2007 also allows for two-way synching of certain content.  The most common way of connecting to a SharePoint library is through the SharePoint Actions menu, as shown below.

SharePoint Connect1

Another way to distribute the connection to a user is by sharing it through an Outlook context menu.  If you’ve already connected the library to Outlook, just right-click the folder in Outlook and choose “Share…”.  Then you can choose the people you want to email the connection to.  Anyone who receives the message will get an “Open” section in their “Share” ribbon in Outlook 2007, and can click to connect to or preview the library.

SharePoint Connect2

White these methods work well, they’re not efficient for distributing SharePoint connections to large numbers of people.  Fortunately, you can write scripts that directly run stssync commands and then deploy those scripts to multiple users.

In a batch file, the command looks like:

start iexplore.exe stssync://sts/?ver=version&type=folder-type&cmd=command-name&base-url=sts-url&guid=the-guid&site-name=site-friendly-name&list-name=list-friendly-name&list-url=list-url&user-id=uid

You can repeat this command multiple times in the batch file for each library that you want to connect to.

Ver 1.0 is used for Outlook 2003, and ver 1.1 is used for Outlook 2007.  The command fields are based on the properties of the library, with the only difficult one to find being the GUID.  In order to find the GUID, you have to actually open the source code of the default web page for the library and search for the text “ExportHailStorm.”  That javascript function includes the library’s GUID and other properties.

Additionally, if you roll out reg keys first according to this article (http://support.microsoft.com/kb/941836) then you can mark these libraries as trusted, and the user won’t get the Yes/No box asking if they want to connect the list to Outlook.  Otherwise the user will be prompted for each list that you attempt to connect.  By rolling out that reg key first, you can ensure a truly silent install.

This specification has some more details on the stssync protocol:

http://msdn.microsoft.com/en-us/library/dd587524(office.11).aspx