How to create Addin button in New Message Window and Inbox Window of Outlook 2007 using VSTO.
This code adds button to the main window of Outlook 2007.
//Define the existent Menu Bar
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, false);
I am using Visual Studio 2005 with VSTO installed for Office 2007