Removal of standard toolbar from outlook

  • Thread starter Thread starter mookashi
  • Start date Start date
M

mookashi

Hi,
Could any one tell me how to remove the standard toolbar from outloo
programmatically through VB. I want to delete or disable this toolba
whenever im opening a new mail item .
The toolbar consists of buttons like Send, the save,print icon an
other standard command buttons.

any help would br greatly appreciated
thank
 
In a NewInspector event handler the following code would do it. This
isn't checking to see if the new item in the Inspector is a mail item
or handling use of the Next or Previous buttons and some other things
but it should give you the idea.

The interface you are using doesn't put any of the preceding message
into the posts you make, so if you answer this please do so manually.
Otherwise it makes it impossible to follow the thread.

Dim oBar As Office.CommandBar

'Inspector is passed into the NewInspector event handler
Set oBar =Inspector.CommandBars("Standard")
oBar.Enabled = False
oBar.Visible = False
Set oBar = Nothing
 
hi,
thanks for your reply. it works. but now im trying to enable the butto
it isnt coming on. On certain conditions i want the standard toolbar t
be enabled and at other times i want it disabled.
I must have done something wrong or deleted it by mistake. Also when
right click on the inspector window it doesnt show the Standard toolba
option at all. Shouldn't the option be present although unchecked??








Re: Removal of standard toolbar from outlook
In a NewInspector event handler the following code would do it. This
isn't checking to see if the new item in the Inspector is a mail item
or handling use of the Next or Previous buttons and some other things
but it should give you the idea.

The interface you are using doesn't put any of the preceding message
into the posts you make, so if you answer this please do so manually.
Otherwise it makes it impossible to follow the thread.

Dim oBar As Office.CommandBar

'Inspector is passed into the NewInspector event handler
Set oBar =Inspector.CommandBars("Standard")
oBar.Enabled = False
oBar.Visible = False
Set oBar = Nothing
 
Did you reverse the order of Enable and Visible? Get the toolbar as a
CommandBar and set Visible True first and then Enable. See if that
works.

If you completely deleted the toolbar somehow and it's not there at
all then exit Outlook and using Windows Explorer find and delete a
file named Outcmd.dat. Make sure Windows Explorer is set to show
hidden and system folders. When you restart Outlook the toolbar should
be back again.
 
Back
Top