I followed this tutorial, but when I build then run my project in visual studio a ribbon tab does not appear. I'm using outlook 2010 if that helps.
Turns out you need to set the ribbontype property to Microsoft.Outlook.Explorer for it to show up. This is not the default value for that field, and no msdn tutorial seems to tell you to make that change.
this.RibbonType = "Microsoft.Outlook.Explorer";
) in InitializeComponent method but this seems to be a dirty hack as this method is not intended for manual editing. –
Catlin http://msdn.microsoft.com/en-us/library/bb398246.aspx
I used this link on MSDN to fix the error. Simply says that you need to set the RibbonType property for which occurrences you want the ribbon visible/usable.
This can also happen if your code previously used the Ribbon XML mechanism before switching to the Ribbon Designer mechanism, and you have inadvertently left a CreateRibbonExtensibilityObject
override in place:
protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
return new MyRibbon();
}
Once you remove this override, your Ribbon Designer customizations will load as expected.
Old post but it didn't give me an answer. In my case the add In was simply not showing anymore after some development time for no explicit reason.
The solution was to re-enable the AddIn in Excel. It probably happened one of the time Excel was asking me "Excel is having trouble with this AddIn, disable it ?" that appeared sometimes when deploying (F5).
To reenable it go to Excel -> File -> options -> AddIns
You have to select the correct ribbontype property, if you are mapping your ribbon to new mail compose tab then you have to select Microsoft.Outlook.Explorer.Compose, if you are mapping to reading mail then you have to select Microsoft.Outlook.Explorer.Read and so on.
If previously you run the solution resulting in an error, an office application may still run hidden and prevent showing the Add-In. Stop VisualStudio, check taskmanager for orphan Office processes, kill these.
Also, any error in the XML structure results in it not being able to load. My culprit? using idMso vs id for my custom tab.
Word VSTO.
© 2022 - 2024 — McMap. All rights reserved.