About Me

Tuesday, October 02, 2007

Outlook Add-in and SharePoint: Getting Started

As some of you might know I was involved with the CA Visual Objects community in a previous life. "VO" as we passionately call it is a Win-32 bit environment with good OO-support and an xBase (Clipper) background, somewhat like Visual Foxpro. And soon there will even be a .net version called Vulcan!

In the VO forum I was requested to write some articles about how to save e-mail into SharePoint. So I've done some research and came up with a few really basic articles that explain how to create an Add-in for Outlook 2007 using VSTO 2005 SE, how to save items to SharePoint, how to add context menu items etc. All in C#.

The articles are posted here: http://www.softwareobjectives.com.au/VoConversion/Article%20Archive/Forms/HomePage.aspx (this is Part I and II, more to follow soon). The objective of the articles is to keep the code limited to a few lines, each time expanding a bit more. The first deals with how to hook up event handlers and save send mail to SharePoint automatically, the second how to add a context menu item and save incoming mail manually. Next I will add some info on how to process multiple Items, introducing the new Table/SQL queries for Outlook, add dialogs on Save and set item properties so that mail can be 'tagged' for the correct client, staffmember, order or whatever kind of context you would like to add.

If you have any questions or requests of other functionality you would like to know about just leave a comment.

8 comments:

Thanks for the great article. My question is what if we don't implement sharepoint and instead want to save the message out to a directory. Is there a way to do so? if there is, is there a way to browse and view the content of that directory right within outlook as if it one of the folders created under the Inbox? Thanks!

Sure, just call the Item.SaveAs method with a normal filename. Although for stuff like email I really recommend using SharePoint as it gives youmuch more flexibility for organising and filtering/viewing contents than a regular Directory. (And SharePoint (WSS) is a free component of Windows 2003 server!).

When you go SharePoint (WSS 3.0) you automatically get the capability to connect a Document Library (== Directory) to Outlook 2007, which displays the content of the library as a node in the left pane.This also sync's automatically so it enables users to take files off-line when they travel.

we do have sharepoint server and did try that process. The problem is that the need of accessing 80 GB worth of email is the problem when sync automatically. Each time a structure of these 80 GB changes, Office 2007 takes a long time to sync back and normally taking up all the hardware resources, too. What's your thoughts on that?

Updating the metadata is the 'tricky bit' I've solved that generically because the 'problem' obviously occurs in multiple places, for example also when you have LOB-applications that need to set/get SharePoint properties on documents stored in SharePoint.

So, what I have is a Web Service running on my server that can deal with these things. You'll see that once you have a Web Service, you'll start using it for all kinds of things.

The reason I use a Web Service is that in the server side code I have full access to the SharePoint object model and that's much more productive (for me at least) than tring to solve everything using the SharePoint Web Services, which of course you could use as well.