简体   繁体   English

如何以编程方式删除Outlook 2013中的菜单上下文项

[英]How to programmatically remove a menu context item in Outlook 2013

I have an Outlook add in that was written with Outlook 2010 in mind but I am updating to handle Outlook 2013 correctly. 我有一个Outlook插件,它是用Outlook 2010编写的,但我正在更新以正确处理Outlook 2013。 As part of the add in I have included a number of context menu buttons using the IRibbon method. 作为添加的一部分,我使用IRibbon方法包含了许多上下文菜单按钮。

At this point these new menu items work correctly, however I wish to remove one of the default Outlook contxt menu buttons with right clicking on a mail item or document in a specific folder. 此时,这些新菜单项正常工作,但是我希望通过右键单击特定文件夹中的邮件项目或文档来删除其中一个默认的Outlook contxt菜单按钮。

I have tried declaring a GetVisible event for the button in the Ribbon XML but this does not get fired like the GetVisibile calls I have for my new custom added buttons. 我已尝试为Ribbon XML中的按钮声明一个GetVisible事件,但这不会像我为我的新自定义添加按钮调用的GetVisibile一样被触发。

If anyone has any hints, tips or experience with disabling one of the default Outlook 2013 context menu options they would be much appreciated. 如果任何人有任何关于禁用其中一个默认Outlook 2013上下文菜单选项的提示,提示或经验,我们将非常感激。

Having looked into this further, the "Delete" option I was looking to remove was a new addition on 2013, having originally thought the add in I was working with had removed it in 2010. 在进一步研究之后,我想要删除的“删除”选项是2013年的新增功能,最初认为我正在使用的添加内容在2010年删除了它。

It shares the same behaviour as the "Delete" button in the main top ribbon and appears to be a menu item that cannot be removed on an item type basis, but you can suppress the behaviour of the button within the add in. 它与主要功能区中的“删除”按钮具有相同的行为,并且似乎是一个无法在项目类型基础上删除的菜单项,但您可以抑制添加中按钮的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM