Disclaimer: I realize this isn't for Outlook 2010, but this may provide you with enough inspiration on how to build based upon the Outlook 2007 structure.
Note: The following example could be built using a VBA Macro or Outlook Plugin.
If you locate where "Related Messages" exists in the
CommandBar hierarchy (Outlook Menu structure) - you can leverage the
Copy mechanism and place the existing
CommandBarButton in the Standard
CommandBar (in the case of Outlook 2007). Once you've done this - you can rename the
Caption and assign a different shortcut key (see below for reference). In this example, we can use Alt+M to trigger the "Related Messages" advanced find dialog.
Outlook.Explorer explorer = Application.ActiveExplorer();
// retrieve menu toolbar for this explorer
CommandBar menuBar = explorer.CommandBars.ActiveMenuBar;
for (int i = 1; i <= menuBar.Controls.Count; i++)
if (menuBar.Controls[i].Caption == "&Tools")
var toolsMenu = menuBar.Controls[i] as CommandBarPopup;
for (int j = 1; j <= toolsMenu.Controls.Count; j++)
if (toolsMenu.Controls[j].Caption == "&Instant Search")
var searchMenu = toolsMenu.Controls[j] as CommandBarPopup;
for (int k = 1; k <= searchMenu.Controls.Count; k++)
if (searchMenu.Controls[k].Caption == "&Related Messages...")
var related = searchMenu.Controls[k] as CommandBarButton;
var relatedClone = related.Copy(explorer.CommandBars["Standard"]);
relatedClone.Caption = "Related &Messages";
In Outlook 2010, you may just try doing the following since there isn't a standard commandbar (it was replaced by the ribbon UI). The usage would then be Alt+M and then Enter to trigger the "Related Messages" advanced find dialog. However - this hasn't been tested though.
var relatedClone = related.Copy(menuBar);
Dim menuBar As CommandBar
Dim toolsMenu As CommandBarPopup, searchMenu As CommandBarPopup
Dim related As CommandBarButton, relatedClone As CommandBarButton
Set menuBar = Application.ActiveExplorer().CommandBars.ActiveMenuBar
Dim i As Integer, j As Integer, k As Integer
For i = 1 To menuBar.Controls.Count Step 1
If (menuBar.Controls(i).Caption = "&Tools") Then
Set toolsMenu = menuBar.Controls(i)
For j = 1 To toolsMenu.Controls.Count Step 1
If (toolsMenu.Controls(j).Caption = "&Instant Search") Then
Set searchMenu = toolsMenu.Controls(j)
For k = 1 To searchMenu.Controls.Count Step 1
If (toolsMenu.Controls(k).Caption = "&Related Messages...") Then
Set related = searchMenu.Controls(k)
Set relatedClone = related.Copy(Explorer.CommandBars("Standard"))
relatedClone.Caption = "Related &Messages"