Building an Outlook 2013 Add-in


Creating Add-ins for office products has become easier than before thanks to VSTO. It stands for Visual Studio Tools for Office and it’s a set of tools(Visual studio project templates and an API) that allows developers create Add-ins for Microsoft office using any managed code like C# and VB.Net.
In this blog post, I’m going to show you how to build a Add-in for Outlook 2013 using C# and VS 2013. Just remember that all steps and code snippet that you’re going to see here is not specific for Outlook Add-ins but all other office components like Word and Excel.

Creating an Outlook Add-in walkthrough

First of all we need to create a new Outlook 2013 Add-in project:





the default add-in project will looks like this:


Now let’s add a new Ribbon item to our project


You’ll get an empty Ribbon like this


Let’s add a test button from the toolbox, change its properties, give it a cool icon and custom tooltip. This button will just show a message for the user


Now double click on the button in order to add an event handler to it. We gonna use the MessageBox class to show a simple message to the user

        private void showMessage_Click(object sender, RibbonControlEventArgs e)
            MessageBox.Show("This is my first VSTO Button", "Information",     MessageBoxButtons.OK,MessageBoxIcon.Information);

When your run this project, Outlook will be launched and our simple Add-in will be loaded into it.
By default, our Ribbon will be shown in the read mail window so in order to see our button you have to double click an email to launch the read mail window, our button will be in the complement Ribbon


just click the button to see the messageBox we already add it in the button event handler


If you want to change where our button will be shown, you have to change the properties of our Ribbon. All possible locations will be available in the RibbonType property



Since the official release of VSTO, creating add-ins for office components in managed code has become possible and you can see how simple that was. Now you can admit that is the missing piece every .net developer was waiting for to expand their programming skills to Microsoft Office Suite.


One thought on “Building an Outlook 2013 Add-in

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s