Outlook Web Addin Context Menu

1k views Asked by At

Trying to add Context menu inside Outlook Web Addin (using VS Code) on the email read page but does not show up any. Not sure what is missing OR if any other part to be added in the manifest.xml

Reference code used from: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/contextual-outlook-add-ins

Need context menu on the Orange highlighted part

<ExtensionPoint xsi:type="DetectedEntity">
        <Label resid="contextLabel" />
        <!--If you opt to include RequestedHeight, it must be between 140px to 450px, inclusive.-->
        <!--<RequestedHeight>360</RequestedHeight>-->
        <SourceLocation resid="detectedEntityURL" />
          <Rule xsi:type="RuleCollection" Mode="Or">
            <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
            <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" /> 
            <Rule xsi:type="ItemHasKnownEntity" EntityType="PhoneNumber" Highlight="all" />
          </Rule>
      </ExtensionPoint>

enter image description here

1

There are 1 answers

3
Mavi Domates On BEST ANSWER

You are getting confused between a Contextual Add-in and a Context Menu.

Outlook add-ins don't support the Context Menu extension points per documentation here: https://learn.microsoft.com/en-us/office/dev/add-ins/reference/manifest/extensionpoint

From the docs - see that you don't have the ContextMenu in Outlook and you have it in W,X,P,OneNote.

Extension points for Word, Excel, PowerPoint, and OneNote add-in commands.

  • PrimaryCommandSurface - The ribbon in Office.
  • ContextMenu - The shortcut menu that appears when you right-click in the Office UI.

Extension points for Outlook MessageReadCommandSurface

  • MessageComposeCommandSurface
  • AppointmentOrganizerCommandSurface
  • AppointmentAttendeeCommandSurface
  • Module (Can only be used in the DesktopFormFactor.)
  • MobileMessageReadCommandSurface
  • MobileOnlineMeetingCommandSurface
  • LaunchEvent
  • Events
  • DetectedEntity

The manifest you have above references to the DetectedEntry extension point - which means if the conditions in the rule list is satisfied - you should get the Contextual Add-in. Not a menu.