将Outlook Web Addin功能添加到上下文菜单

时间:2018-02-12 16:07:37

标签: office-js outlook-web-addins

是否可以在上下文菜单中添加Outlook Web Addin功能?可以使用旧的VSTO Addins:

enter image description here

我只找到一些带标签色带的例子,例如:

      <!--PrimaryCommandSurface==Main Office Ribbon-->
      <ExtensionPoint xsi:type="PrimaryCommandSurface">
        <CustomTab id="Contoso.Tab1">
          <Group id="Contoso.Tab1.Group1">
            <Label resid="Contoso.Tab1.GroupLabel" />
            <Icon>
              <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon" />
              <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon" />
              <bt:Image size="80" resid="Contoso.TaskpaneButton.Icon" />
            </Icon>
            <!--Control. It can be of type "Button" or "Menu" -->
            <Control xsi:type="Button" id="Contoso.FunctionButton">
              <Label resid="Contoso.FunctionButton.Label" />

2 个答案:

答案 0 :(得分:3)

Outlook Web Add-ins允许通过仅添加命令来自定义功能区。请在Add-in commands for Outlook文章中详细了解相关内容。

答案 1 :(得分:1)

据我所知,might是可能的。您可以为其他Office应用找到示例here,但我认为它也适用于Outlook。在Excel中,添加了上下文菜单,并将以下代码添加到清单中。请注意,下面的代码不包括对网址,长字符串和短字符串的引用(resid res)。

<!-- ContextMenu extends selected context menus (E.g. right click menu)--> 
      <ExtensionPoint xsi:type="ContextMenu">
        <!--The id of the menu specifies the existing context menu being extended-->
        <!--ContextMenuCell (Excel) and ContextMenuText (Word) are currently supported-->
      <OfficeMenu id="ContextMenuCell">
        <Control xsi:type="Menu" id="Contoso.TestMenu2">
          <Label resid="residLabel3" />
          <Supertip>
            <Title resid="residLabel" />
            <Description resid="residToolTip" />
          </Supertip>
          <Icon>
            <bt:Image size="16" resid="icon1_32x32" />
            <bt:Image size="32" resid="icon1_32x32" />
            <bt:Image size="80" resid="icon1_32x32" />
          </Icon>
          <Items>
            <Item id="showGallery2">
              <Label resid="residLabel3"/>
              <Supertip>
                <Title resid="residLabel" />
                <Description resid="residToolTip" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="icon1_32x32" />
                <bt:Image size="32" resid="icon1_32x32" />
                <bt:Image size="80" resid="icon1_32x32" />
              </Icon>
              <Action xsi:type="ShowTaskpane">
                <!--TaskPaneId is required. It is currently not used by the framework but it will be in a future iteration -->
                <TaskpaneId>MyTaskPaneID1</TaskpaneId>
                <!--The URL to show inside the taskpane -->
                <SourceLocation resid="residUnitConverterUrl" />
              </Action>
            </Item>
          <Item id="showGallery3">
              <Label resid="residLabel5"/>
              <Supertip>
                <Title resid="residLabel" />
                <Description resid="residToolTip" />
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="icon1_32x32" />
                <bt:Image size="32" resid="icon1_32x32" />
                <bt:Image size="80" resid="icon1_32x32" />
              </Icon>
              <Action xsi:type="ShowTaskpane">
                <TaskpaneId>MyTaskPaneID2</TaskpaneId>
                <SourceLocation resid="residUnitConverterUrl" />
              </Action>
            </Item>
          </Items>
        </Control>
      </OfficeMenu>
     </ExtensionPoint>
相关问题