Edit

ExtensionPoint element

Defines where an add-in exposes functionality in the Office UI. The element is a child element of AllFormFactors, DesktopFormFactor or MobileFormFactor.

Add-in type: Document, Mail, Presentation, Task pane, Workbook

Valid only in these VersionOverrides schemas:

  • Task pane 1.0
  • Mail 1.0
  • Mail 1.1

For more information, see Version overrides in the add-in only manifest.

Attributes

Attribute Required Description
xsi:type Yes The type of extension point being defined. Possible values depend on the Office host application defined in the grandparent element value.

Extension points for Excel, Outlook, PowerPoint, and Word

  • LaunchEvent - Activates tasks based on application events, such as opening.

LaunchEvent

This extension point enables an add-in to activate based on supported events in both the desktop and mobile form factors. To learn more about event-based activation and for the full list of supported events, see Activate add-ins with events.

Important

Registering Mailbox and Item events isn't available with this extension point.

Child elements

Element Description
LaunchEvents List of LaunchEvent for event-based activation.
SourceLocation The location of the source JavaScript file.

Important: The resid value of the element must match the resid value of the element that represents the browser runtime. For example, if your runtime is defined as , specify

Example


  
    
    
  
  
  

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

There are three types of extension points available in some or all of these hosts.

  • PrimaryCommandSurface (Valid for Word, Excel, PowerPoint, and OneNote) - The ribbon in Office.
  • ContextMenu (Valid for Word, Excel, PowerPoint, and OneNote) - The shortcut menu that appears when you right-click (or select and hold) in the Office UI.
  • CustomFunctions (Valid only for Excel) - A custom function written in JavaScript for Excel.

See the following subsections for the child elements and examples of these types of extension points.

PrimaryCommandSurface

The primary command surface in Word, Excel, PowerPoint, and OneNote is the ribbon.

Child elements

Element Description
CustomTab Required if you want to add a custom tab to the ribbon (using PrimaryCommandSurface). If you use the element, you can't use the element. The id attribute is required. There can be no more than one child element.
OfficeTab Required if you want to extend a default Office app ribbon tab (using PrimaryCommandSurface). If you use the element, you can't use the element.

Important

There can be no more than one element in the add-in that has a child element; and that one element can have only one , so there is only one element across all elements.

Example

The following example shows how to use the element with PrimaryCommandSurface. It adds a custom tab to the ribbon.

Important

For elements that contain an ID attribute, make sure you provide a unique ID.


  
    

ContextMenu

A context menu is a shortcut menu that appears when you right-click (or select and hold) in the Office UI.

Child elements

Element Description
OfficeMenu Required if you're adding add-in commands to a default context menu (using ContextMenu). The id attribute must be set to one of the following strings.
  • ContextMenuText if the context menu should open when a user right-clicks (or selects and holds) on the selected text.
  • ContextMenuCell if the context menu should open when a user right-clicks (or selects and holds) on a cell in an Excel spreadsheet.

Example

The following customizes the context menu opened on the selected text in a supported Office application. The context menu control used is of type Button.