Outlook 2007 Aufgaben in Suchordnern anzeigen

Hallo zusammen,
für manche Sachen braucht man einfach Skripts.
Und dieses Makro ermöglicht es Outlook 2007 Aufgaben in Suchordnern zu finden; etwas was eigentlich nur Mails vorbehalten ist.

Hier der Snip aus der Source:
Sub CreateNewSearchFolder()

Set MyOutlookApplication = Outlook.Application
SearchSubFolders = True
Set MapiNamespace = Application.GetNamespace(”MAPI”)
Set TasksFolder = MapiNamespace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderTasks).Parent
strS = “’” & TasksFolder.FolderPath & “’”

Dim folderName As String
folderName = InputBox(”What category would you like to create a search folder for?:”, “Category”, “”)
Dim objSch As Search
Dim categoryFilter As String
categoryFilter = “(”"urn:schemas-microsoft-com:office:office#Keywords”" LIKE ‘%” & folderName & “%’)”

Dim taskFilter As String
taskFilter = “(”"http://schemas.microsoft.com/mapi/proptag/0×0e05001f”"= ‘Tasks’ AND “”http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81010003″” <> 2) OR (NOT(”"http://schemas.microsoft.com/mapi/proptag/0×10900003″” IS NULL) AND “”http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81010003″” <> 2)”
Dim strTag As String
strTag = “RecurSearch”

‘ Create the tasks folder

Set objSch = Application.AdvancedSearch(Scope:=strS, Filter:=categoryFilter & ” AND (” + taskFilter + “)”, _
SearchSubFolders:=True, Tag:=strTag)
objSch.Save (folderName)

‘ Create the mail folder

Set objSch = Application.AdvancedSearch(Scope:=strS, Filter:=categoryFilter, _
SearchSubFolders:=True, Tag:=strTag)
objSch.Save (folderName & ” (Mail)”)

End Sub

The above macro will prompt you for a category name and auto-magically create two search folders – one that will display the active tasks assigned to that category, and one that will display all items (both mail and tasks) assigned to that category.

Source http://simonguest.com/2009/03/11/using-search-folders-in-outlook-2007-for-gtd