Question

How might it be possible to activate one of PowerPoint's ribbon buttons from C# ?

We want to be able to run some code in the context that is set up by pressing one of the ribbon buttons.

Just running our code via the interop doesn't work.

I want to be able to do something like this:

Ribbon.GetControlByName(controlName).DoClick()

Does anyone know if something like this might be possible, or know that it's not possible ?

Any hints would be greatly appreciated.

Was it helpful?

Solution

Going old school on you, but this is one of the best ways (still) to do this, assuming there is a Ribbon<->CommandBar coorelation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top