Allow Outlook add-ins to detect when user is composing during read-mode activation
When an Outlook add-in is opened via the message action bar while a user is composing a reply, the add-in loads in read mode. However, the add-in has no way to detect that the user is actively composing, which prevents any compose-specific functionality from working correctly.
Steps to Reproduce
- Open Outlook and select an email message
- Click Reply to start composing a reply
- Click an add-in button from the message action bar
- The add-in loads with the /read URL route
- The add-in cannot determine whether the user is composing or just reading
Expected Behavior
The add-in should have a way to detect that a compose window is open so it can adapt its behavior or redirect to the appropriate compose mode.
Actual Behavior
The add-in loads in read mode with no API or mechanism to detect that the user is composing. The URL alone (/read) is insufficient to determine the actual user context.
Root Cause
Currently, there is no Office.js API that allows a read-mode add-in to detect whether a compose window is open for the current message. The manifest also does not provide context-aware routing capabilities.
Requested Solution
Please provide one or more of the following:
- An Office.js API that allows read-mode add-ins to detect if a compose window is active for the current message
- A way for the manifest to route action bar buttons contextually (to /compose if composing, /read if reading)
- Additional context information passed to the add-in so it knows which entry point was used and the actual user context
Without this, any add-in that supports both read and compose functionality cannot provide a consistent user experience when opened from the message action bar during compose.