IRibbonExtensibility GetCustomUI not called

爷,独闯天下 提交于 2019-12-22 09:20:09

问题


I'm developing a shared add-in for Outlook.

One of my customers is experiencing trouble on his machine, he does not see my add-in buttons/ui in the main window ribbon.

After exploring his environment and my logs I noticed that the function "GetCustomUI" of interface IRibbonExtensibility is not being called in his environment.

I'm not sure what can be the cause for the different behavior, why doesn't Outlook call the GetCustomUI on the customer machine?

Also - Is it possible to initiate a call to this method by myself? or maybe refresh the ribbon so it will call GetCustomUI?

If anyone has an idea, please help.


回答1:


I had same problem. It seems the class implementing IRibbonExtensibility should be defined with ComVisible(true) attribute. Like this:

[ComVisible(true)]
public class Ribbon : IRibbonExtensibility {
...
}


来源:https://stackoverflow.com/questions/15810829/iribbonextensibility-getcustomui-not-called

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!