如何在自定义功能区选项卡中使用内置Outlook组

时间:2018-05-03 08:27:13

标签: xml outlook-addin ribbon

我正在为Outlook加载项创建一个标签,我需要实现outlook的功能区的内置组元素。

<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
  <ribbon>
    <tabs>
      <tab idMso="TabMail">
        <button id ="myButtonId" screentip="myTab"/>
      </tab>
      <tab id="myTabId" insertAfterMso="TabMail">
        <group idMso="GroupMailNew"/>

        <!-- some addional elements -->

      </tab>
    </tabs>
  </ribbon>
</customUI>

正如您所看到的那样,我正在尝试使用GroupMailNew ID为Outlook的小组调用新的电子邮件/项目,但它会返回:

enter image description here

它假设如下:

enter image description here

(没有小水平New Email按钮)

我认为可能有两种方法可以解决它:

  1. 使用不同的idMso
  2. 尝试找到New Email元素编辑并将其visible属性设置为false。
  3. 任何帮助?

1 个答案:

答案 0 :(得分:1)

您需要在自定义组中包含内置控件,而不是添加包含所有控件的内置组:

<?xml version="1.0" encoding="UTF-8"?>
 <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
  <ribbon>
   <tabs>
    <tab idMso="TabMail">
      <button id ="myButtonId" screentip="myTab"/>
    </tab>
    <tab id="myTabId" insertAfterMso="TabMail">
     <group id="your_id_here">
       <!-- built-in controls with idMso specified go there -->
     </group/>
    </tab>
   </tabs>
  </ribbon>
</customUI>

在以下系列文章中阅读有关Fluent UI的更多信息: