M
Mark Wilson
I've creaqted the following macro to show or hide a CommandBar.
Sub Toggle()
Dim x As Boolean
x = Application.CommandBars("Picture").Visible
MsgBox (x)
Application.CommandBars("Picture").Visible = Not x
End Sub
When I run it in Word XP or Word 2003 it toggles the state of the Picture
CommandBar.
If I use Outlook XP or Outlook 2003 and set the e-mail editor to be Word I
can run the macro when composing a new messge and the Commandbar either shows
or disappears.
However, when I run the macro when reading a message, the CommandBar either
stays visible or hidden. The state of the CommandBar in variable "x" toggles
from TRUE to FALSE or FALSE to TRUE each time the macro is run. However, the
CommandBar does not disappear from the screen.
How do I make this work when reading an e-mail message?
Sub Toggle()
Dim x As Boolean
x = Application.CommandBars("Picture").Visible
MsgBox (x)
Application.CommandBars("Picture").Visible = Not x
End Sub
When I run it in Word XP or Word 2003 it toggles the state of the Picture
CommandBar.
If I use Outlook XP or Outlook 2003 and set the e-mail editor to be Word I
can run the macro when composing a new messge and the Commandbar either shows
or disappears.
However, when I run the macro when reading a message, the CommandBar either
stays visible or hidden. The state of the CommandBar in variable "x" toggles
from TRUE to FALSE or FALSE to TRUE each time the macro is run. However, the
CommandBar does not disappear from the screen.
How do I make this work when reading an e-mail message?