![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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 ToolsRules 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. |
#2
|
|||
|
|||
![]()
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 wrote in message ups.com... 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 ToolsRules 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. |
#3
|
|||
|
|||
![]()
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. |
#4
|
|||
|
|||
![]()
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" wrote in message ups.com... 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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to add a menu item to AppointmentItem's right-click menu? | OctopusThu | Add-ins for Outlook | 6 | January 25th 07 06:43 PM |
Create Menu Item | Chrischik | Outlook and VBA | 2 | July 17th 06 08:13 PM |
Menu item bug in Outlook 2003 | QuasiCodo | Outlook - Installation | 1 | June 13th 06 03:29 PM |
missing menu item | DavidW | Outlook - Installation | 6 | May 7th 06 10:30 PM |
Finding the control ID for the menu button that you want to disabl | Tim Bolton | Outlook and VBA | 1 | January 13th 06 06:35 AM |