This is a part 2 of blog posts on this subject, you can read part 1 here.

Within the first part of this post, I showed you had to remove the Reply-All functionality via GPO. At its core the process is relatively straight forward (obtain Outlook ADM templates, define policies, link and deploy it). However you have to take some things within this article at "face value". Specifically, the values I provided for the Command Bar ID as well as the values for disabling the keyboard shortcuts within the respective policies.

At this point I wanted to take some time to show you how to verify these for yourself. The benefit being that you would be able to leverage a number of the techniques presented here to successfully disable other shortcuts and/or command buttons should and when you so desire.

Prior to getting started it is worth noting that two separate approaches need to be utilized to obtain the appropriate command and shortcut IDs. Out on the Internet there seems to be a lot of confusion on how to best determine the Command Bar IDs, so I'm going to start with that first as it seems to be giving the most people difficulty.

Determining Command Bar IDs:

In retrospect there are a number of different techniques that could be utilized to obtain the valid Command Bar IDs in Outlook.

  • MSKB 1736004 ((http://support.microsoft.com/kb/173604), actually has a complete list for Outlook 97. I don't know about you... but that is a bit old for my taste, although obviously most of the Command-IDs will stay the same for backwards compatibility, etc. Nevertheless a simple review of that document will show that the Command ID for "Reply All" is = 355.

CommandBar                      Control ID
Compose Reply to All               355

  • You could also use a tool like Outlook SPY. Once you become proficient with it the Command IDs will be easily ascertained.

How I did it:

A very easy way to do this is to use Outlook Visual Basic Editor. So the first thing you need to do is enable the VBA Editor if you are not already doing so (most people don't).

To Enable:

  • Open Outlook.
  • Select the Tools menu, and then select Options.
  • Select the "Other" tab.
  • Select Advanced Options.
  • Under "In all Microsoft Office Programs" section select "Show Developer tab in the Ribbon".
  • Select OK.
  • Then Apply and OK on the Options page.
  • Restart Outlook.

Once Outlook has been restarted, you can now use Visual Basic for Applications to determine the Command Button ID for Reply-All.

The code to follow is loosely based on the sample provided in MSKB 173604 with some subtle changes. First this code when executed will create a file on the root of the d:\ named OLIDS.txt. So, if you don't have a d:\ you will need to adjust the code as appropriate to reflect a valid path. However once properly executed you will have an output file in text format with all the valid Command IDs for Outlook.


  • Open Visual Basic in Outlook.
  • Add a reference to the Microsoft Scripting Runtime Library (From the Tools menu in the VBA Editor, select References, and then add the Microsoft Scripting Runtime). Once located, select OK to return to the VBA Editor:

  • Paste the following code into your project:

Sub GetIDsForInspector()
      ' The Outlook object library must be referenced.
      Dim objOL As New Outlook.Application
      Dim objCommand As Object
      Set cb = objOL.ActiveExplorer.CommandBars
      ' We will Create a new Text document.
      Dim objtxt
      Dim txtfile
      Set objtxt = CreateObject("Scripting.FileSystemObject")
      Set txtfile = objtxt.CreateTextFile("D:\OLIDs.txt", 8)
         ' 3500 is the maximum # of Controls Outlook has defined.
         For I = 1 To 3500
            Set lbl = cb.FindControl(, I)
            If lbl Is Nothing Then
               ' Do nothing.
               ' Insert CommandBar name, Command name, and ID.
               txtfile.WriteLine (lbl.Parent.Name & Chr(9) & lbl.Caption & Chr(9) & I)           
            End If
      End Sub

  • Run the Form. Once done you will notice a text file has been created on the d:\ named OLIDS.txt. Open this file in notepad. You will notice that the Standard Menu Bar has a Command ID of 355 for Reply to All:

Standard     Reply to A&ll 355


If you didn't care about compiling an entire list of al l Command IDs but only wanted to get the value for Reply All, you could substitute the above code with what I have below. This script will simply throw the value into a message box:

Sub GetIDsForInspector()
      ' The Outlook object library must be referenced.
      Dim objOL As New Outlook.Application
      Dim objCommand As Object
      Set cb = objOL.ActiveExplorer.CommandBars
      ' Create a new Text Document.
      Dim objtxt
      Dim txtfile
      Set objtxt = CreateObject("Scripting.FileSystemObject")
      Set txtfile = objtxt.CreateTextFile("D:\ \OLIDs.txt", 8)
         ' 3500 is the maximum # of Controls Outlook has defined.
         For I = 1 To 3500
            Set lbl = cb.FindControl(, I)
            If lbl Is Nothing Then
               ' Do nothing.
               ' Insert CommandBar name, Command name, and ID.
'Uncomment next 2 lines if you want all Outlook CMD Ids
               'txtfile.WriteLine (lbl.Parent.Name & Chr(9) & lbl.Caption & Chr(9) & I)
               If (InStr(lbl.Caption, "Reply to A&ll")) Then
                MsgBox lbl.Parent.Name & Chr(9) & lbl.Caption & Chr(9) & I
                Exit For
                End If        
            End If
   End Sub

So this is where the value of "355" came from in the "Disable Command Bar Buttons and Menu Items Policy" (from Part 1 of this post). Screenshot again:

Determining the Short Cut Key IDs and Modifiers:

As evident from above, the shortcut key consists of two independent numbers separated by a ",". The first number is the actual shortcut key (R in this scenario). To get the proper value you need to convert the ASCII character to a decimal value. This is easy enough to do by simply looking it up in an ASCII table (http://www.asciitable.com/).

As you can see the capital "R" character equates to 82 in Decimal Notation:

So this is how the first number set is defined for the shortcut pair.

The second set of numbers (in this case 12) is determined by the fact that the CTRL + SHIFT modifiers must be used in (conjunction with the R key), to issue the short cut.

The numerical equivalent for the shortcut modifiers:

Alt = 16

Ctrl = 8

Shift = 4

When multiple modifiers are used (as in this case), the numerical values must be added together. So in the case of a Reply All keyboard shortcut that uses (CTRL + SHIFT + R)

CTRL = 8

Shift = 4

Total: 12

This is why we needed to add the value of 82,12 to the Key and Modifier to Disable entry on the Disable Command Bar Buttons and Menu Items Policy. Screenshot again (see Part 1 of this post):

As I mentioned earlier in the post you can apply this knowledge to other Outlook Command IDs and shortcuts rather easily. After deciding on what Outlook Command Button(s) or Short-Cut(s) you want to disable, you simply perform the conversions and add them to the now in-place Custom GPO.

For reference these are some additional Command IDs and shortcuts that should prove as a decent guide for double-checking your understanding of how the conversions are performed:


Command Bar ID:

Short-cut Pair:

Actual Outlook Short-cut:

New Mail:




Send Email:




Forward Email:






8 0,8






View GAL:




Move to Folder:





The combination of techniques described in this post provides an easy, legitimate way of disabling Reply-All functionality within the Outlook client (no DCR required!), should and when it be called for. Additionally these techniques can be "massaged" to fit other potential needs with an Active Directory/Exchange/Outlook environment.

I hope you found the post interesting and useful. If you did, please share your thoughts with me by leaving some feedback comments (I do read them!).

Happy Trails!

- Eric Norberg

Not applicable

Excellent couple of posts. Thanks for outlining the entire process - it was extremely helpful!
Not applicable
Office 2007 Disable user interface items and shortcut keys:


2007 Office System Document: Lists of Control IDs


Not applicable
What keeps a user from selecting all the users in the GAL? or sending to multiple large DL's?

While the suggestions are interesting ways of playing with Outlook they do not address the issue of a large distribution or pushing the messaging system beyond reasonable limits.

From my experience can only be controlled via Max Recipients and Max Message Size restrictions. Please correct me if I am wrong, but I believe article may be misleading.
Not applicable
I can definately see this as a useful feature, not just for the reply-all reason but maybe preventing printing of emails or some other similar task.  

Can you use this same methodology to CREATE menu bars?  We had a client who wanted to have a public calendar on the menu bars in outlook.  It was a small client so we added the shortcut url by hand, however it would be useful to add this in automatically.  Will the group policies support that?
Not applicable
Great post. Thanks.
Not applicable
Would this remove reply all for Outlook Web Access? Exchange Active Sync? Blackberry Devices?
Not applicable
If only we could find a legitimate reason to disable the 'send' button too :D
Not applicable
Eric, this is really great stuff. Thanks.