Question

I have an inspector in Outlook 2010 that contains a button that was placed in the Show group in the ribbon. The inspector current item is an appointment item. The form that this button originally belonged to no longer exists but, the button remains in the Show group and there is no documentation on this button. Is there a way to list all of the buttons by ID that are in the current ribbon? I'm looking to find the ID of this button so I can set enabled to false in my XML but, have had no luck thus far.

EDIT: To be a little more precise, I'm looking to loop through all of the elements in the ribbon in Outlook so I can find the correct ID of a button I want to remove from it. I'm using C#, .NET 4.0 and VSTO for the add-in.

Was it helpful?

Solution

Answering this myself in case anyone needs it.

You can use HideFormPage("Button Name") to hide the orphaned button placed in the ribbon by a custom form. There is no need to loop through the ribbon and find it.

Application.ActiveInspector.HideFormPage("Button Name");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top