Hi, I would like to recognize which "mode" PowerPoint is currently in. By "mode", I mean such things as selection mode, eyedropper, format painter, shape insertion (basically, a "mode" determines what happens when I click). For the eyedropper, I was able to solve the problem (eyedropper in PowerPoint 2013), but I would like to know whether there is a more general solution that applies to all (or at least some of those) "modes".
To be more specific, I am currently trying to figure out whether the format painter is currently active. I would have thought that I can simply ask
CommandBars.GetPressedMso("FormatPainter")but as it turns out, the above does not work. (As a side note: Surprisingly,
CommandBars.ExecuteMso("FormatPainter")works as expected.)
In PowerPoint 2003, I can do the following:
Sub CheckFormatPainter2003() Dim btn As CommandBarButton Set btn = CommandBars.FindControl(Id:=108) ' 108: format painter Debug.Print btn.State End SubThe above snippet works as a workaround, but only if one of my command bars contains the format painter button. If not, it does not work.
I suppose it is not the wisest idea to do the check depending on CommandBars or ribbons, but it seems PowerPoint has no dedicated interface for querying those kinds of things.
So, the question remains: Is there a reliable, preferably documented way to figure out whether the format painter is currently active? And more general: Is there a way to figure out which "mode" PowerPoint is currently using?