SharePoint – Outlook Synchronization

You can configure your Outlook to synchronize the Tasks, Events, Calendar with SharePoint lists. This is possible thru the stssync Protocol.

The stssync protocol enables you to add an Events list or a Contacts list that exists on a Microsoft Windows SharePoint Services site to Microsoft Office Outlook 2003 / 2007 or to a third-party application that supports the protocol.

The URL which does this synchronization is having format of

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

e.g.

stssync://sts/?ver=1.1&type=tasks&cmd=add-folder&base-url=http://moss:99/Test/CompanySite&list-url=/Lists/Project%20Tasks/&guid={5d0b44fe1-3041-43f9-8be6-c330c1444538}&site-name=CompanySite&list-name=Project? Tasks

Where :

version :

The version of the application in the format x.y. For example, for Outlook 2003, the value of this parameter should be 1.0. For outlook 2007 version is 1.1. The values x and y must be composed of numbers only. x must not start with a zero, and y must be either zero or some other sequence of digits that does not start with a zero. Also x and y cannot be more than two digits each, or Outlook considers the URL to be malformed. A third-party client application may or may not use this parameter, but when the URL is constructed, the parameter must have a value — otherwise, the URL is considered malformed.

folder-type :

Can be calendar or contacts or task, depending on the type of SharePoint list being added to Outlook or to a third-party application. This parameter is case-insensitive.

command-name :

The command name that Outlook or the third-party application understands. Specify add-folder to add a folder to Outlook. More commands may be added to Outlook later.

sts-url :

The URL to the SharePoint site being added. Should not end in a / character.

the-guid :

The GUID that, when paired with the sts-url parameter, uniquely identifies a SharePoint list. Outlook expects this parameter to be in the following format: “{“+ 8 hexadecimal characters + “-” + 4 hexadecimal characters + “-” + 4 hexadecimal characters + “-” + 12 hexadecimal characters + “}”. If this parameter is in a different format, Outlook considers the URL malformed and returns an error.

site-friendly-name :

The display name of the site containing the list that is being added. Outlook uses this parameter to create the folder name.

list-friendly-name :

The display name of the list that is being added. Outlook uses this parameter to create the folder name.

list-url :

A string that is added to the sts-url parameter to create the full URL for the list. Should start with a / character.

uid :

Optional. A number greater than zero, with fewer than eight digits. Uniquely represents a user on the SharePoint site.

Notes

  • Special character escaping: If any of the characters “&”, “\”, “[“, “]”, or “|” is part of the value of the sts-url, site-friendly-name, list-friendly-name, or list-url parameter, it must be preceded by a “|” character. For example, a list-friendly-name of Dan [Wilson] – Business\Personal Contacts would become Dan |[Wilson|] – Business|\Personal Contacts.
  • The sts-url, site-friendly-name, list-friendly-name, and list-url parameters can contain Unicode characters. However, the Unicode characters must be enclosed in brackets “[ ]” and must be 4-digit hexadecimal character representations of the Unicode characters.
  • When you connect a Microsoft Windows SharePoint Services task list to Microsoft Office Outlook 2007, some columns may not appear in Outlook 2007. This is because you can synchronize a limited set of predefined properties by using the Connect to Outlook feature. However, you cannot connect custom SharePoint task list columns to Outlook 2007.
    All Outlook 2007 users see the same information when they view synchronized SharePoint task list items. This is true even if an Outlook field such as Categories does not appear in Internet Explorer when you view a SharePoint task list. Outlook synchronizes these properties to other Outlook users through the server that is running Windows SharePoint Services.

    To view an Outlook 2007 field such as Categories in Internet Explorer, add that field as a column template. To add an Outlook 2007 field to the SharePoint task list, use the Add Site Columns command on the Settings menu in the SharePoint task list. Administrators can use this feature to make the appearance of the synchronized SharePoint task list more consistent with Outlook 2007 and can sync a limited set of predefined properties.

To implement a third-party client that can make use of the stssync protocol to add and synchronize Events and Contacts lists that exist on a SharePoint site, you typically need to implement an ActiveX control called StssyncHandler and provide support for the stssync protocol. The third-party client typically needs to be able to decode the URL and synchronize the Contacts or Events list on the SharePoint site. You can use the Microsoft.SharePoint namespace or the Web services exposed by Windows SharePoint Services to perform this task. You also need to register the stssync protocol in the registry with the name of the executable file of your application. In Microsoft Windows operating environments with Microsoft Internet Explorer version 5.0 or later, you can use the sample provided below. Copy the following lines to a .reg file, and replace the “<Path to exe>” with the path to the executable file of the application that wants to synchronize events and contacts with Windows SharePoint Services. Then double-click the .reg file to register the stssync protocol on your computer.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\stssync]

@=”URL:Add SharePoint Folder”

“URL Protocol”=””

[HKEY_CLASSES_ROOT\stssync\shell]

@=”open”

[HKEY_CLASSES_ROOT\stssync\shell\open]

@=””

[HKEY_CLASSES_ROOT\stssync\shell\open\command]

@=”<Path to exe> \”%1\””

Example

stssync://sts/?ver=1.0&type=calendar&cmd=add-folder&base-url=http%3A%2F%2Fspserver1&list-url=%2FLists%2FEvts%2FAllItems%2Easpx&guid=%7BAA7D945C%2DE5C3%2D4854%2DB631%2D10A98E711E2B%7D&site-name=Share|%7CPoint%20|%5BSite|%5D&list-name=Ev[00E900F1]ts

This URL is for a list called “Events” on a site called “Share|Point [Site]” with site URL http://spserver1 and list URL http://spserver1/Lists/Evts/AllItems.aspx. Note the use of the vertical bar to escape the “|”, “[“, and “]” characters, and the hexadecimal representation of the two Unicode characters in the list name.

Advertisements

6 Comments

  1. October 20, 2009 at 5:02 PM

    Hi. I get the syntax — thanks for the great explanation. But where do I actually put the URL in Outlook to create the connection to Sharepoint? Sorry if it seems like a very obvious question/answer. Just trying to learn!

  2. October 27, 2009 at 9:00 PM

    @Bruce, the protocol handler for the STSSYNC protocol will process the URL from within Internet Explorer. That is, if the user just clicks the hyperlink you construct (so that IE launches and tries to interpret the hyperlink), Windows will call the protocol handler code that imports the appropriate link into Outlook.

  3. marc filion said,

    October 6, 2010 at 9:28 PM

    nothing new here.
    it is juste a cut and paste of msdn…

  4. October 29, 2010 at 8:38 PM

    Microsroft Office is still the best program when it comes to spreadsheet and word processing”-~

  5. November 17, 2010 at 9:24 PM

    i use both open office and microsoft office and i would say that microsoft office is more responsive and user friendly :’:

  6. Rajani said,

    December 4, 2012 at 3:24 PM

    Can we handle multiple lists with in one url.Please help.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: