nlid's avatar
nlid
Brass Contributor
Jul 31, 2025
Status:
New

Support for Right-Click Event Hook in Word to Dynamically Update Custom Context Menu Items

The Office JavaScript API currently provides support for adding custom items to Word’s context menu and controlling their enabled/disabled state. However, there is no event hook available to detect when a user performs a right-click within the document.

This limitation prevents add-ins from dynamically evaluating the current context and updating menu item availability accordingly. As a result, users may encounter disabled options when they expect functionality, or enabled options that are irrelevant to their current selection or location in the document.

In contrast, this capability is fully supported in the VSTO (Visual Studio Tools for Office) framework, allowing developers to align closely with Word’s native UX behavior. The absence of a comparable feature in Office JS presents a significant obstacle in the process of migrating existing solutions to the web-based platform.

Request:

We propose the introduction of a right-click (or context menu) event hook in the Office JS API for Word. This event should provide sufficient contextual information to enable add-ins to make real-time decisions about which menu items should be active.

This enhancement would greatly improve the interactivity and responsiveness of modern Office add-ins, helping to bring them closer to parity with legacy solutions and ensuring a smoother user experience.



1 Comment