none
DASL Filtering limitations? RRS feed

  • Question

  • Does outlook DASL filters work with multiple queries?  For instance:  I can search just by subject but  when I include from, it just brings up everything.

        sRestrict = Chr(34) & "urn:schemas:httpmail:subject" & Chr(34) & " LIKE '" & _
        Me.txtSubject & "'" & " AND " & Chr(34) & _
    "urn:schemas:httpmail:from" & Chr(34) & " LIKE '" & Me.txtFromFilter & "'"

        Set myItems = objOutlook.AdvancedSearch(objOlFolder, sRestrict)
        Set myResults = myItems.results
        For Each oItem In myResults
               ' SysCmd acSysCmdUpdateMeter, n
              '  n = n + 1
                  If oItem.Attachments.Count > 1 Then
                        sSleep (100)
                        Me.lstAttatchments.AddItem (oItem)
                    End If
        Next oItem
    • Moved by Max Meng Monday, April 1, 2013 2:56 AM
    Saturday, March 30, 2013 8:36 PM

All replies

  • Hi,

    This is a quick note to let you know that we are performing research on this issue and will get back to you as soon as possible.


    Max Meng
    TechNet Community Support

    Monday, April 1, 2013 2:06 AM
  • If you call Search.Save to save the Search object as a search folder and then look at it with OutlookSpy (click IMAPIFolder button, go to the getSearchCriteria tab), does the search criteria look right?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Monday, April 1, 2013 3:20 AM