Friday, November 21, 2008

Outlook Add - in with Dotnet

Do you know we have separate tool kit in Visual studio 2008 for creating Add-ins for outlook, Word , Excel etc., You can use it for specific business flows as well.

Let me explain how it will be useful in a typical business scenario. You can develop add-in called Purchase Order Processor to your outlook.

Whenever some one want to place a purchase Order, he will clik on the add-in it will open a windows form. He will enter all the details and it will submit the form for the approver with a mail. Once approver opens the mail he will get the details of that order, he can approver or Deny it. If he approves the order mail request will be sent to vendor, if he denys the order mail will be sent to requester.

You can achieve all functionalities like connecting to Database, reports, download of excel, pdf's. In short you can automize business workflow simply from outlook.
Lets see the technically options for implementation.

Options
1. Developing COM add in VBA: In outlook go to Tools --> Forms --> Design Form --> select library from Look in. You have variety of standard library's from which you can select. You have to write code in VBA.
Pro:
Quick development.
Con:
Old fashioned development. Customization, scalability is limited.

2. Developing using Visual Studio Tools for Office (VSTO): You can develop using VB.net or C#.net add-in for Outlook for 2003 or 2007. If you have visual studio 2005, you have to download VSTO from here:
http://msdn.microsoft.com/en-us/office/aa718674.aspx
If you are using Visual Studio 2008 it comes in built in.

Advantage of VSTO option:
A solution structure that includes both the add-in project itself and a setup project to ease deployment
Simple Start up and Shutdown events where developers start adding their code
A run time component
An add-in loader that creates the add-In's App Domain and handles security and some other add-in essentials
Not to mention better debugging and error handling.

You can select "Extensibility Projects" in "Other projects" in Visual Studio templates. You have to select add-in project specific for word, excel, outlook etc.,
You can handle all events in the IDTExtensibility2 class, Like On add-in start, update, on add-in connection, disconnection, close etc.,

You can implement windows form to create and submit custom Forms.

For deployment you can make use of click once deployment by Microsoft or simply copy the DLL and manifest to user computer office add-In's folder. When he starts the application (word, excel, outlook ) the add-in will be automatically detected.
Happy Learning.

1 comment:

  1. Is it required to have Dotnet framework installed on the machine to run the add in from outlook?

    ReplyDelete

 
web counter
Download a free hit counter here.