add menu in outlook using in plugin application

In this post, we will discuss how to add a menu in outlook using C#.Net for plugin application. Also, you can check out my previous posts on:
For this you need to create outlook 2007 adding projects and here is a small brief by which you can create outlook add-in project.
From Visual Studio 2008 File -> New -> Project  From the New Project Dialog box Expand Visual C# then Office then Click on 2007 and the select Outlook 2007 Add-in from the Visual Studio installed templates. By doing this you will successfully able to create the Project. And in the add-in project, there will be a ThisAddIn.cs class. This class will be responsible for adding menus. Here is the code:
public partial class ThisAddIn
        private Office.CommandBarButton buttonHelp;
        private Office.CommandBarButton buttonFeedback;
        private Office.CommandBarButton buttonAbout;
        private string menuTag = “AspDotNetHelp”;
    private void ThisAddIn_Startup(object sender, System.EventArgs e)
         //Search the menu and delete it if found
                    //Method to create new menu
          private void RemoveMenubar()
            // If the menu already exists, remove it.
                Office.CommandBarPopup foundMenu = (Office.CommandBarPopup)
                    missing, menuTag, true, true);
                if (foundMenu != null)
            catch (System.Exception ex)
     private void AddMenuBar()
    Account acc = new Account();
     menuBar = this.Application.ActiveExplorer().CommandBars.ActiveMenuBar;
                //Define the new Menu Bar into the old menu bar
                newMenuBar = (Office.CommandBarPopup)menuBar.Controls.Add(
                    Office.MsoControlType.msoControlPopup, missing,
                    missing, missing,true);
                //If I dont find the newMenuBar, I add it
                if (newMenuBar != null)
                    newMenuBar.Caption = “AspDotNetHelp”;
                    newMenuBar.Tag = menuTag;
                    buttonAbout = (Office.CommandBarButton)newMenuBar.Controls.Add(Office.MsoControlType.msoControlButton, missing, missing, 1, true);
                    buttonAbout.Style = Office.MsoButtonStyle.msoButtonIconAndCaption;
                    buttonAbout.Caption = “About AspDotNetHelp”;
                    buttonAbout.Enabled = false;
                    // buttonAbout.FaceId = 3737;
                    //buttonAbout.Tag = “c1”;
                    buttonFeedback = (Office.CommandBarButton)newMenuBar.Controls.Add(Office.MsoControlType.msoControlButton, missing, missing, 1, true);
                    buttonFeedback.Style = Office.MsoButtonStyle.msoButtonIconAndCaption;
                    buttonFeedback.Caption = “Feedback”;
                    buttonFeedback.Enabled = false;
                    // buttonFeedback.FaceId = 3737;
                    // buttonFeedback.Tag = “c2”;
                    buttonHelp = (Office.CommandBarButton)newMenuBar.Controls.Add(Office.MsoControlType.msoControlButton, missing, missing, 1, true);
                    buttonHelp.Style = Office.MsoButtonStyle.msoButtonIconAndCaption;
                    buttonHelp.Caption = “Help”;
                    buttonHelp.Enabled = false;
                    // buttonHelp.FaceId = 3737;
                    //buttonHelp.Tag = “c3”;
 newMenuBar.Visible = true;
 menuBar.Visible = true;
//You can also add event handlers for the menus like
buttonHelp.Click += new Office._CommandBarButtonEvents_ClickEventHandler(buttonHelp_Click);
If you will run this code then a new menu will appear help menu in Outlook.
Check out Best Alternative to InfoPath -> Try Now


New to Office 365 SharePoint Online? Get Office 365 Enterprise E3 Subscription & Try out all the features

(Installation & Features)

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site

View all posts by Bijay Kumar →