1

Is it possible to add an Outlook Web Addin function to the context menu? As it was possible with the old VSTO Addins:

enter image description here

I only find some examples with tab ribbons, like:

      <!--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
  • 3
    No, it is impossible to do that. Commented Feb 12, 2018 at 16:16
  • 1
    I work in Outlook add-in development and I had this requirement as well. However, the context menu in Outlook web add-in is not allowed to be extended. Microsoft hasn't provided the context menu as a extension point for web add-in. So this is not possible. However, it is possible in native windows add-in. Commented May 18, 2018 at 10:10

2 Answers 2

4

Outlook Web Add-ins allow customizing the ribbon by adding commands only. Read more about that in the Add-in commands for Outlook article.

Sign up to request clarification or add additional context in comments.

Comments

0

From what I can tell this might be possible. You can find an example here for a different Office app, but I assume that it should hold true for Outlook as well. In Excel a context menu is added with adding the following code to the manifest. Please note that the code below does not include the references (resid's) to urls, long strings and short strings.

<!-- 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>

2 Comments

Thanks this should work only for Word and Excel as described in the comment.
Then why did you accept that other answer, and not this one?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.