You can use a pseudo-SQL called "DASL" to search Outlook items in VBA (vbscript/Visual Basic for Applications).  I never can quite remember the syntax.  To interactively discover the syntax:

  1. Select View/Arrange By/Current View/Customize Current View
  2. Press the Filter button
  3. Use the Advanced tab to build your query.
  4. Use the SQL tab to see the DASL.

One thing I haven’t figured out yet is how to select items that do not have "waiting" as one of the categories.  If you build a query using "doesn’t contain" and "waiting", the DASL it builds is "<> ‘waiting’" and that fails if the item has multiple categories.