DrGreg1408
Technical User
I apologize beforehand if there is an obvious answer to this question. I have searched and not found that answer, but that doesn't mean it's not right there staring me in the face.
Does anyone know how to use VBA to read the state of the Italic built-in toggle button, i.e., whether it is depressed or not?
The following does not work:
Commandbars("Formatting").Controls("&Italic").State
That always returns a zero no matter which state the button is in.
What I want to do is intercept the button so that, instead of applying the italic formatting, it will apply the Emphasis character style. And vice versa; if the button is currently depressed, then when the user clicks it (unselects it), I want the Emphasis character formatting removed. But to do this, I need to be able to read the current status of the button.
gsw
Does anyone know how to use VBA to read the state of the Italic built-in toggle button, i.e., whether it is depressed or not?
The following does not work:
Commandbars("Formatting").Controls("&Italic").State
That always returns a zero no matter which state the button is in.
What I want to do is intercept the button so that, instead of applying the italic formatting, it will apply the Emphasis character style. And vice versa; if the button is currently depressed, then when the user clicks it (unselects it), I want the Emphasis character formatting removed. But to do this, I need to be able to read the current status of the button.
gsw