Tuesday, November 15, 2011

Create your own MS Office add-ins using .Net


-Mohankumar Deivasigamani
Introduction
      Here I am sharing the steps that will guide you to create a simple MS Office add-in using Microsoft Visual Studio. For further explanation lets take Visual Studio 2010 and MS Office 2010.

Prerequisites
You must have the following items to be installed
  1. MS Visual Studio 2010 (You can also use 2005 / 2008)
  2. Microsoft .Net Framework 3 (minimum 2.0 up to 4.5)
  3. Office PIA (Primary Interop Assemblies)
Start creating add-ins
  • Open MS Visual Studio 2010 > Select New Project > Other Project Types > Extensibility


  • Now choose Shared Add-in project Template as shown above.
  • Enter the project name and solution name in the appropriate fields and click ok.

Configuration Wizard
Wizard screen will guide you following steps
  1. Press Next in the welcome add-in wizard
  2. Select the programming Language which you want to develop. (C#)
  3. Select the application host (Word / Visio / Publisher / Project / Power Point /Outlook / Info Page /Excel /Access)
  4. Enter name and description of your add-in
  5. Choose Add-in option
  6. Click the finish button to create new MS Office add-in and setup project for selected host application.
Projects created
Two projects will be created automatically as follows
  1. Add-in project (CSSSampleAddin)
  2. Setup project (CSSSampleAddinSeup)

Add-in gets installed, which is highlighted in the screen displayed below.


Now you can start writing your code to build add-in menu in OnConnection() method of Connect.cs class file. Further you can setup project to create msi /exe which will help you to create add-in other machine.

Note: Await for my next post which will help you to create Ribbon menu in MS Office Word



2 comments:

Data recovery said...

This is very helpful site http://www.recoversdata.com/

Aaron Bentley said...

I was very encouraged to find this site. I wanted to thank you for this special post.
data recovery dallas