Visual Studio VSTO Outlook 加载项:将自定义组添加到特定选项卡

时间:2020-12-18 22:15:41

标签: vb.net outlook vsto ribbon

我已经能够为 Outlook 创建一个插件,并添加了一个功能区(可视化设计器)并设置了一个自定义选项卡和一些控件。问题是我需要它在特定的视图中。 在这种情况下,我需要它出现在会议和约会视图中。

首先,我点击 Outlook 上的日历视图:

here

然后,每当我点击任何约会或会议时,我都需要在那个地方有一个自定义图标: Calendar View Place for the custom icon

这可能吗?我尝试过一些 ControlId 设置,但似乎没有一个能完成工作。

提前致谢。

1 个答案:

答案 0 :(得分:1)

当然。您的功能区 XML 必须指定适当的内置选项卡(请参阅下面的 TabAppointment)和内置组(请参阅下面的 insertBeforeMso="GroupClipboard"

<?xml version="1.0" encoding="utf-16" standalone="no"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="OnLoad">
  <ribbon>
    <tabs>
      <tab idMso="TabAppointment">
        <group id="id1" label="Infor CRM" visible="1" insertBeforeMso="GroupClipboard" getImage="GetImage">
          <toggleButton id="id2" size="large" getLabel="OnGetLabel" getImage="GetImage" getPressed="OnGetButtonPressed" screentip="tip" supertip="supertip" onAction="OnToggleButtonClick" getEnabled="GetEnabled"/>
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>
相关问题