Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting a control ID from Item in SUB menu

0 views
Skip to first unread message

mcsl...@gmail.com

unread,
Jun 26, 2007, 11:58:27 AM6/26/07
to
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.

Sue Mosher [MVP-Outlook]

unread,
Jun 26, 2007, 12:36:16 PM6/26/07
to
Try the code sample at http://www.outlookcode.com/codedetail.aspx?id=1507

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


<mcsl...@gmail.com> wrote in message news:1182873507.6...@u2g2000hsc.googlegroups.com...

McSlemon

unread,
Jun 26, 2007, 7:39:35 PM6/26/07
to
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.


Sue Mosher [MVP-Outlook]

unread,
Jun 27, 2007, 9:21:04 AM6/27/07
to
Sorry, but I don't know of any "Client Side Rules" command.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"McSlemon" <mcsl...@gmail.com> wrote in message news:1182901175.6...@g4g2000hsf.googlegroups.com...

0 new messages