Unable to customise context menus in PowerPoint 2007?

I got this question from one of our partners yesterday.

The application developed by my client is an add-in for PowerPoint. One of the features it provides involves adding custom items to the context menu of shapes and pictures using the Office object model. This add-in works perfectly well in 2003, but not at all in 2007.

So far, what I’ve discovered is that the only context menu I can add items to is the Frames CommandBar. Some other CommandBar interfaces in the Application.CommandBars collection allow me to add without throwing an exception (e.g. Pictures Context Menu), but they don’t actually show when the application is running.

I’ve read on a couple of forum posts that you simply can’t do this anymore. Is this true? Or is this a problem with either Office or the way we are attempting to customise the context menu?

If you can’t add items to the context menu anymore, then what is the recommended method of displaying context information for such objects? I have played with the idea of displaying a tab in the Ribbon bar when an item is selected, but it just doesn’t jump out at users like the context menu...

I couldn't see a way of doing what was required either, so I kicked the question up to one of our internal tech aliases. Unfortunately, the answer is not what you’re probably hoping for (bug rejected – feature deprecated):

Unfortunately, the PPT 2007 OM does not allow adding context menu items for all objects (like shapes), the suggested way is to use Ribbon UI customization. Have a look at the following bug that contains a detailed explanation on this (and an internal link)

The explanation in the bug record was in the form of a letter to the original (external) raiser of the bug:

The Microsoft PowerPoint and User Experience Team have investigated the "PPT2007: Needs ability to Customize Right Click menus in PowerPoint” feature request and determined that this is not a feature that is feasible to implement outside of a full product cycle due to the extensive redesign and integration of core menu and object model functionality that would be required. For this reason, and because an explicit goal of the Office 2007 product’s design was to expand Ribbon functionality and deprecate classic menu functionality, we recommend that xxx design this portion of its solution around the new Ribbon feature, given that PowerPoint 2007 no longer provides legacy right-click menu customization.

We understand that the intention is for you to customize the right-click menus with custom actions to navigate through the application and perform various tasks, however, right-click menu creation and functionality is not a feature in Power Point 2007. There is currently no upgrade path for previous Power Point solutions that have customized right click menu functionality. All previous Power Point solutions using this functionality will need to implement the Ribbon into their solution to drive user choices.

In reviewing the proposal of adding in legacy right-click menu customization functionality, the Microsoft User Experience Team found several areas that pushed a potential solution beyond the scope of a Hotfix or CDCR.

1. The sheer scope of designing and adding the right-click menu customization feature and full legacy functionality exceeds the risk capacity for post-release changes. Design changes of this scope typically require a full product cycle in order to ensure end-to-end quality.

2. Office 2007 has a new object rendering engine, which could cause inconsistencies if the submenu feature were implemented. A new solution would have to handle all changes between the two code bases.

3. PowerPoint 2007 does not provide the same high-fidelity representation of legacy Main Menu functionality that was available in PowerPoint 2003. The layout of the controls in the Ribbon's Add-ins Tab is sub-optimal with a highly complex add-in such as yours. To fully maximize the end-user experience, the add-In would need to be upgraded to fully utilize the Ribbon UI, as part of moving to Office 2007.

Our recommendation is for you to combine the redesign of both the legacy Main Menu and right click menu issues together. This will provide the opportunity for your users to move to the Ribbon in both areas and utilize the new Ribbon functionality.

In summary, Microsoft recommends that you model your UI on Office’s own built-in Ribbon UI, specifically around the use of Contextual Tabs as the mechanism for displaying contextually relevant content. For each object type that the add-in supports, a tab could be added to the appropriate contextual tab set that would contain the Add-In-specific tools for working with that object. With this type of design, the UI would better match the UI of Office 2007, and the end-users could potentially not require much extra training on top of the training for Office 2007 itself. For more information, please check out the Office Fluent UI Style Guide at the Office Fluent Ribbon Developer Portal.

I guess that it makes sense in the long term to continue to leverage the great work the Office UI team have done with the Ribbon and the Fluent UI generally, but I do feel for the team who are looking to implement equivalent functionality in the new version of their Add-In as already runs in the current version.

Backwards compatibility is a perennial problem.