Locking Toolbars in Outlook?

D

Dave Horne

I'm using Outlook 2002 and on several occasions have accidentally dragged a
Toolbar off the program. It would be great if I could lock the Toolbars in
place to prevent that from happening. Does this feature exist in newer
versions of Outlook? Thanks, DH
 
B

Brian Tillman

Dave Horne said:
I'm using Outlook 2002 and on several occasions have accidentally
dragged a Toolbar off the program. It would be great if I could lock
the Toolbars in place to prevent that from happening. Does this
feature exist in newer versions of Outlook?

I don't believe so.
 
K

Ken Slovak - [MVP - Outlook]

That's only available using code.

Each toolbar is an Office.CommandBar object.

Setting the Protection property of the CommandBar to (msoBarNoChangeDock +
msoBarNoChangeVisible + msoBarNoCustomize + msoBarNoMove + msoBarNoResize)
pretty much would lock the toolbar down from any changes.
 
D

Dave Horne

Ken, I appreciate that information but I have no idea how to use it. I was
really just hoping that future versions of Outlook would incorporate a 'Lock
the toolbars' feature. DH
 
K

Ken Slovak - [MVP - Outlook]

Future versions of Outlook will use the ribbon exclusively and no toolbars
or menus. So what you have now is all that you'll get.
 
D

Dave Horne

OK. Thanks.


Ken Slovak - said:
Future versions of Outlook will use the ribbon exclusively and no toolbars
or menus. So what you have now is all that you'll get.
 
R

Remove ABCD from Email address to reply

I am interested in implementing this but I do not know how set the
protection property of the commandbar and would appreciate a little more
help. Also, will this keep the various toolbar locations from changing
after I move them to where I want them (I have 3rd party toolbars)?
 
K

Ken Slovak - [MVP - Outlook]

The protection for each toolbar/menu has to be set independently. Settings
for one does not affect any others.

With third party toolbars each one is different. Some may lock themselves,
so may specify a specific positioning. You would have to run code to lock
each one and only after each one was established. So the code would have to
run at some point after all Outlook startup was completed, which pretty much
means running it manually every time you start up.

Properly written code does not persist toolbars so each time Outlook starts
the toolbars are created and the are destroyed each time you shut down. So
settings in one session will be gone in the next Outlook session.

You also have separate settings for each open folder view (Explorer) and
each open item (Inspector). Every time an item is opened the code would have
to run if you want to persist positioning of toolbars for open items.

So the drill would be:
1. Open Outlook or an item or a new window to view a folder.
2. After startup is complete position each toolbar where you want it.
3. Run the code to lock the toolbars.

This would have to be repeated each time you opened Outlook or a new folder
window or any item.

I'd say the work involved isn't worth it.

A macro to do this would look something like this:

Sub SetToolbars()
Dim oBars As Office.CommandBars
Dim oBar As Office.CommandBar

' for items it would be Application.ActiveInspector.CommandBars
Set oBars = Application.ActiveExplorer.CommandBars
For Each oBar In oBars
oBar.Protection = msoBarNoChangeDock + msoBarNoChangeVisible _
+ msoBarNoCustomize + msoBarNoMove + msoBarNoResize
Next
End Sub

You'd have to decide which of those protections you wanted applied, that
would be up to you.
 
R

Remove ABCD from Email address to reply

Thanks for the detailed explanation. I agree the pain is greater than the
gain, I will live with the situation as is.

--

Neil


Ken Slovak - said:
The protection for each toolbar/menu has to be set independently. Settings
for one does not affect any others.

With third party toolbars each one is different. Some may lock themselves,
so may specify a specific positioning. You would have to run code to lock
each one and only after each one was established. So the code would have
to run at some point after all Outlook startup was completed, which pretty
much means running it manually every time you start up.

Properly written code does not persist toolbars so each time Outlook
starts the toolbars are created and the are destroyed each time you shut
down. So settings in one session will be gone in the next Outlook session.

You also have separate settings for each open folder view (Explorer) and
each open item (Inspector). Every time an item is opened the code would
have to run if you want to persist positioning of toolbars for open items.

So the drill would be:
1. Open Outlook or an item or a new window to view a folder.
2. After startup is complete position each toolbar where you want it.
3. Run the code to lock the toolbars.

This would have to be repeated each time you opened Outlook or a new
folder window or any item.

I'd say the work involved isn't worth it.

A macro to do this would look something like this:

Sub SetToolbars()
Dim oBars As Office.CommandBars
Dim oBar As Office.CommandBar

' for items it would be Application.ActiveInspector.CommandBars
Set oBars = Application.ActiveExplorer.CommandBars
For Each oBar In oBars
oBar.Protection = msoBarNoChangeDock + msoBarNoChangeVisible _
+ msoBarNoCustomize + msoBarNoMove + msoBarNoResize
Next
End Sub

You'd have to decide which of those protections you wanted applied, that
would be up to you.
 
R

Remove ABCD from Email address to reply

I currently use Outlook 2003 and have the toolbar problem. Does this
problem exist in Outlook 2007?

--

Neil


Remove ABCD from Email address to reply said:
Thanks for the detailed explanation. I agree the pain is greater than the
gain, I will live with the situation as is.
 
K

Ken Slovak - [MVP - Outlook]

Explorers have toolbars in Outlook 2007 (folder views) but Inspectors don't
(item views). Any toolbars added to an open Outlook item are now shoved
under the Add-Ins tab, each app has its own chunk of the ribbon there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top