Some chunks of code that are too big for their original home on DesktopSearchFeatureRequests.
* General question? Try DesktopSearchQuestions.
* Bug report? Try DesktopSearchBugReports.
* Or go back to MSNSearchFeedback.

Allow "Find all related items" search from Outlook search results


If this can be done I haven't discovered it. If isn't there, it would be killer to have it. If it is there, it should easily discoverable. The more ways that results can be filtered directly from the results page the better.

ANSWER: #1: We didn't have time to get this feature in and right-click extensibility is difficult to say the least in Outlook. Nevertheless...

		 Sub [FindConversation()]
		     Dim item As Object
		     Set item = [ActiveExplorer.Selection.item(1)]
		     Dim exe As String
		     Dim id As String
		     id = [item.ConversationIndex]
		     id = Mid(id, 13, 32)         
		     Dim quote As String
		     quote = Chr(34)
		     exe = "C:\Program Files\MSN Toolbar Suite\DS\02.01.0000.2214\en-us\bin\WindowsSearch.exe"
		     exe = exe + " /url " + quote + "search:store=outlook&show=Any&query=ConversationId:" + id + quote
		     Shell exe, [vbMaximizedFocus]
		 End Sub
	

If you run this from Outlook VBA and hook it to a menu/macro you can get the functionality you are looking for.

ANSWER: #2: The following is a hook that will add WDS to the context menu in Outlook. It has been tested in Outlook 2003 only. -- Jeremy Gollehon

Instructions:
  1. In Outlook go to Tools > Macro > Visual Basic Editor. Paste in the following code into ThisOutlookSession.
  2. In the Visual Basic Editor go to Tools > References and put a check next to "Microsoft Office 11.0 Object Library"
  3. Be sure the WDSLocation string points to the location of WindowsSearch.exe on your machine.
  4. Click the Save button and close the Visual Basic Editor.
  5. If you don't want a Security warning every time you open Outlook then, from Outlook go to Tools > Macro > Security and set the security level to Low. (don't do this if you don't have antivirus software)

		 Option Explicit
		 Private Const [ContextMenuText] As String = "Find Conversation"
		 Private Const [WDSLocation] = "C:\Program Files\MSN Toolbar Suite\DS\02.01.0000.2214\en-us\bin\WindowsSearch.exe" 
		 Private [IgnoreCommandbarsChanges] As Boolean
		 Private [WithEvents] [ActiveExplorerCBars] As [CommandBars]
		 Private [WithEvents] [ContextButton] As [CommandBarButton]
	

		 Private Sub Application_Startup()
		   Set [ActiveExplorerCBars] = [ActiveExplorer.CommandBars]
		 End Sub
	

		 Private Sub ActiveExplorerCBars_OnUpdate()
		   Dim bar As [CommandBar]
		   If [IgnoreCommandbarsChanges] Then Exit Sub
		   On Error Resume Next
		   Set bar = ActiveExplorerCBars.item("Context Menu")
		   On Error [GoTo] 0
		   If Not bar Is Nothing Then
		     [AddContextButton] bar
		   End If
		 End Sub
	

		 Private Sub [AddContextButton(ContextMenu] As [CommandBar)]
		   Dim Control As [CommandBarControl]
		   Set Control = [ContextMenu.FindControl(Type:=MsoControlType.msoControlButton,] [Tag:=ContextMenuText)]
		   If Control Is Nothing Then
		     [ChangingBar] [ContextMenu,] Restore:=False
		     Set Control = [ContextMenu.Controls.Add(Type:=msoControlButton)]
		     With Control
		       [.BeginGroup] = True
		       .Tag = [ContextMenuText]
		       .Caption = [ContextMenuText]
		       .Priority = 1
		       .Visible = True
		     End With
		     [ChangingBar] [ContextMenu,] Restore:=True 
		     Set [ContextButton] = Control
		   Else
		     Control.Priority = 1
		   End If
		 End Sub
	

		 Private Sub [ChangingBar(bar] As [CommandBar,] Restore As Boolean)
		   Static [oldProtectFromCustomize,] oldIgnore As Boolean
		   If Restore Then
		     [IgnoreCommandbarsChanges] = oldIgnore
		     If [oldProtectFromCustomize] Then
		       bar.Protection = bar.Protection And [msoBarNoCustomize]
		     End If
		   Else
		     oldIgnore = [IgnoreCommandbarsChanges]
		     [IgnoreCommandbarsChanges] = True
		     [oldProtectFromCustomize] = bar.Protection And [msoBarNoCustomize]
		     If [oldProtectFromCustomize] Then
		       bar.Protection = bar.Protection And Not [msoBarNoCustomize]
		     End If
		   End If
		 End Sub
	

		 Private Sub ContextButton_Click(ByVal Ctrl As [Office.CommandBarButton,] [CancelDefault] As Boolean)
		   [FindConversationWithWDS]
		 End Sub
	

		 Private Sub [FindConversationWithWDS()]
		   Dim item As Object
		   Dim id As String
		   Dim exe As String
		   Dim quote As String
		   Set item = [ActiveExplorer.Selection.item(1)]
		   id = [item.ConversationIndex]
		   id = Mid(id, 13, 32)
		   quote = Chr(34)
		   exe = [WDSLocation] + " /url " + quote + "search:store=outlook&show=Any&query=ConversationId:" + id + quote
		   Shell exe, [vbMaximizedFocus]
		 End Sub
	
Microsoft Communities