20

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.

4

6 回答 6

76

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.

于 2012-09-28T00:50:40.577 回答
6

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.

于 2014-10-06T18:12:19.367 回答
4

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.

于 2016-10-23T21:28:22.003 回答
3

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

于 2016-03-08T23:02:47.097 回答
3

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.

于 2018-10-11T10:38:35.230 回答
1

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.

于 2017-03-17T16:06:55.817 回答