Support context menus on all elements in Word add-in
Background
We are porting our existing, very successful VSTO add-in to the Office JS API. In our VSTO add-in, we have right-click, aka context menus, on almost all types of Word document elements (e.g. tables, lists, headings, etc.). Unfortunately, we have discovered that context menus in Word are only available when the user right-clicks on plain text (see: https://learn.microsoft.com/en-us/javascript/api/manifest/extensionpoint?view=common-js-preview#contextmenu). This limitation is a showstopper for our efforts to port the VSTO add-in to the modern Office JS platform.
VSTO context menus
In a VSTO add-in, numerous context menus are available:
- ContextMenuText
- ContextMenuList
- ContextMenuTableCell
- ContextMenuTextTable
- ContextMenuTable
- ContextMenuTableWhole
- ContextMenuTableHeading
- ContextMenuLinkedTable
- ContextMenuSpell
- ContextMenuField
- ContextMenuSpelling
- ContextMenuGrammar
- ContextMenuGrammarReading
- ContextMenuLists
- ContextMenuFormField
- ContextMenuRevision
- ContextMenuTrackChanges
- ContextMenuEquationPopup
- ContextMenuDisplayFields
- ContextMenuEditPicture
- ContextMenuPicture
- ContextMenuTablePicture
- ContextMenuFieldDisplay
- ContextMenuEquation
- ContextMenuHeading
- ContextMenuFieldForm
- ContextMenuListTable
- ContextMenuComment
- ContextMenuHeadingTable
- ContextMenuHyperlink
- ContextMenuTableWholeLinked
- ContextMenuFootnote
- ContextMenuEndnote
We hope that the Office JS API will support more of these context menu types. If the dev team does not have sufficient resources to implement all context menu types we would be happy to prioritise.
1 Comment
- EganBoschCopper Contributor
Similarly, I am building an Excel extension and I cannot add items to a context menu when right clicking in a table. I want my extension to natively interact with Github Copilot (which only works on tables). Not being able to do this will drastically the value of my extension.