Getting a control ID from Item in SUB menu

M

mcslemon

Hi,

I'm looking to disable some menu items in Outlook via GPO. This can be
achieved by giving the Control ID of the menu item.

I've found the VBA code that enables you to retrieve these ID's but
they only work for top level items on menus.

Sub EnumerateControls()
Dim icbc As Integer
Dim cbcs As CommandBarControls
Set cbcs = Application.ActiveExplorer.CommandBars("Menu
Bar").Controls("Tools").Controls
For icbc = 1 To cbcs.Count
MsgBox cbcs(icbc).Caption & " = " & cbcs(icbc).ID
Next icbc
End Sub

However, this does not recursively check sub menus.

Basically we need to disable Client-Side Rules under the Tools>Rules
Wizard menu but I can't get the ID for the items in this sub menu.

Can anyone shed any light on this? Perhaps suggesting how I can
recursively check sub menus.. ?

Thanks

Neil.
 
M

McSlemon

Thanks.. that did what I wanted it to do.. much appreciated.

Sadly, Client Side Rules comes up with 0 for an ID which indicates to
me that it can't be disabled.

Does anyone disagree with me? If so, how do I do it!!

Thanks.
 

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