Programmaticaly disable existing button in outlook compose window ribbon

ぐ巨炮叔叔 提交于 2019-12-25 09:05:31

问题


Am writing an outlook add-in in c#. I would like to disable the "Permissions" button in the "Options" tab while composing a new email.

Am currently using Addin express for creating the outlook add-in


回答1:


You need to use command tag with the getEnabled attribute defined. For example:

 <?xml version="1.0" encoding="UTF-8"?>
 <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
  <commands>
    <command idMso="Permissions"  getEnabled="OnGetEnabled" />
  </commands>
 </customUI>

You can repurpose built-in ribbon controls, see Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.

The list of built-in control IDs can be found in the following documents:

  • Office 2016 Help Files: Office Fluent User Interface Control Identifiers
  • Office 2013 Help Files: Office Fluent User Interface Control Identifiers


来源:https://stackoverflow.com/questions/43579868/programmaticaly-disable-existing-button-in-outlook-compose-window-ribbon

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