【问题标题】:Can we use PrimaryCommandSurface in Outlook add-in generated by yo office我们可以在 yo office 生成的 Outlook 插件中使用 PrimaryCommandSurface
【发布时间】:2021-07-17 19:49:11
【问题描述】:

有什么办法可以在outlook插件开发中使用PrimaryCommandSurface在顶部功能区显示插件,如果可以请帮忙更新下有效的manifest.xml。

如果没有其他方法帮助如何创建 Outlook 顶部功能区命令插件

<ExtensionPoint xsi:type="PrimaryCommandSurface">
          <CustomTab id="Contoso Tab">
          <!-- If you want to use a default tab that comes with Office, remove the above CustomTab element, and then uncomment the following OfficeTab element -->
            <!-- <OfficeTab id="TabData"> -->
            <Label resid="residLabel4" />
            <Group id="Group1Id12">
              <Label resid="residLabel4" />
              <Icon>
                <bt:Image size="16" resid="icon1_32x32" />
                <bt:Image size="32" resid="icon1_32x32" />
                <bt:Image size="80" resid="icon1_32x32" />
              </Icon>
              <Tooltip resid="residToolTip" />
              <Control xsi:type="Button" id="Button1Id1">

                  <!-- information about the control -->
              </Control>
              <!-- other controls, as needed -->
            </Group>
          </CustomTab>
        </ExtensionPoint>

      <ExtensionPoint xsi:type="ContextMenu">
        <OfficeMenu id="ContextMenuCell">
          <Control xsi:type="Menu" id="ContextMenu2">
                  <!-- information about the control -->
          </Control>
          <!-- other controls, as needed -->
        </OfficeMenu>
        </ExtensionPoint>

【问题讨论】:

    标签: plugins outlook outlook-addin office-addins yo


    【解决方案1】:

    PrimaryCommandSurface 代表 Office 中的功能区。在 Outlook 中,我们处理读取或撰写项目,因此我们应该使用 MessageReadCommandSurface 接收项目,例如:

    <ExtensionPoint xsi:type="MessageReadCommandSurface">
      <OfficeTab id="TabDefault">
            <-- OfficeTab Definition -->
      </OfficeTab>
    </ExtensionPoint>
    

    TabDefault 是 Outlook 中内置选项卡的 idMso 值。

    您还可以通过以下方式将控件放入自定义选项卡中:

    <ExtensionPoint xsi:type="MessageReadCommandSurface">
      <CustomTab id="TabCustom1">
            <-- CustomTab Definition -->
      </CustomTab>
    </ExtensionPoint>
    

    如果您需要为 Outlook 中的组合项目显示功能区 UI,您需要使用 MessageComposeCommandSurface 扩展点,该扩展点将按钮放在功能区上,用于使用邮件撰写表单的加载项:

    <ExtensionPoint xsi:type="MessageComposeCommandSurface">
      <OfficeTab id="TabDefault">
            <-- OfficeTab Definition -->
      </OfficeTab>
    </ExtensionPoint>
    

    并将控件放入自定义选项卡:

    <ExtensionPoint xsi:type="MessageComposeCommandSurface">
      <CustomTab id="TabCustom1">
            <-- CustomTab Definition -->
      </CustomTab>
    </ExtensionPoint>
    

    请参阅ExtensionPoint element 了解更多信息。

    【讨论】:

    • 有什么方法可以创建添加到功能区中而不是在撰写或阅读项目中。像我们有缩放见面吗?
    • 还有其他扩展点,例如 AppointmentAttendeeCommandSurface,它将按钮放在功能区上,用于显示给会议与会者的表单。请查看我的帖子中提到的文章以获取可用的扩展点。
    • 我们如何创建像我们为 Outlook 缩放一样的插件?
    • 这是另一个问题,所以我建议单独发布一个新问题。
    猜你喜欢
    • 1970-01-01
    • 2021-12-04
    • 1970-01-01
    • 2017-07-05
    • 2017-11-13
    • 2018-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多