Ribbon on Outlook Add-In not appearing with Visual Studio Debugging

Solution:- Open Ribbon1.Designer.cs file make sure you have an entry like this.RibbonType = “Microsoft.Outlook.Mail.Compose, Microsoft.Outlook.Mail.Read”;  in InitializeComponent() method.

Sample  InitializeComponent()

private void InitializeComponent()
{
this.tab1 = this.Factory.CreateRibbonTab();
this.group1 = this.Factory.CreateRibbonGroup();
this.button1 = this.Factory.CreateRibbonButton();
this.tab1.SuspendLayout();
this.group1.SuspendLayout();
this.SuspendLayout();
//
// tab1
//
this.tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
this.tab1.Groups.Add(this.group1);
this.tab1.Label = “TabAddIns”;
this.tab1.Name = “tab1”;
//
// group1
//
this.group1.Items.Add(this.button1);
this.group1.Label = “group1”;
this.group1.Name = “group1”;
//
// button1
//
this.button1.Label = “button1”;
this.button1.Name = “button1”;
this.button1.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button1_Click);
//
// Ribbon1
//
this.Name = “Ribbon1”;
this.RibbonType = “Microsoft.Outlook.Mail.Compose, Microsoft.Outlook.Mail.Read”;
this.Tabs.Add(this.tab1);
this.Load += new Microsoft.Office.Tools.Ribbon.RibbonUIEventHandler(this.Ribbon1_Load);
this.tab1.ResumeLayout(false);
this.tab1.PerformLayout();
this.group1.ResumeLayout(false);
this.group1.PerformLayout();
this.ResumeLayout(false);

}

Add Comment