none
My Code with SearchFilterCollection does not work RRS feed

  • Question

  • Hi all

    I have some Troubles with the SearchFilterCollection. The Code with SearchFilter works. But the Code with SearchfilterCollection returns always 0. Any Ideas?

    Regards Andres

    Dim view As New ItemView(1000)
    Dim ExResult As FindItemsResults(Of Item) = Nothing

    Dim MySearchFilterCollection As New SearchFilter.SearchFilterCollection
    MySearchFilterCollection.Add(New SearchFilter.IsEqualTo(EmailMessageSchema.ItemClass, "IPM.Shedule.Meeting.Request"))
    'MySearchFilterCollection.Add(New SearchFilter.IsEqualTo(EmailMessageSchema.ItemClass, "IPM.Shedule.Meeting.Resp.Pos"))

    Dim MySearchFilter As SearchFilter = New SearchFilter.SearchFilterCollection(LogicalOperator.Or, MySearchFilterCollection.ToArray)
    'Dim MySearchFilter As SearchFilter = New SearchFilter.ContainsSubstring(EmailMessageSchema.ItemClass, "IPM.Schedule.Meeting")

    ExResult = EWService.FindItems(WellKnownFolderName.Inbox, MySearchFilter, view)

    For Each i As Item In ExResult
     txtDebug.Text = txtDebug.Text & vbCrLf & ("To: " & i.DisplayTo)
     txtDebug.Text = txtDebug.Text & vbCrLf & ("Subject: " & i.Subject)
     txtDebug.Text = txtDebug.Text & vbCrLf & ("TimeSent: " & i.DateTimeSent)
      txtDebug.Text = txtDebug.Text & vbCrLf & ("TimeReceived: " & i.DateTimeReceived)
      txtDebug.Text = txtDebug.Text & vbCrLf & ("TimeCreated: " & i.DateTimeCreated)
      txtDebug.Text = txtDebug.Text & vbCrLf & ("LastModifiedTime: " & i.LastModifiedTime)
      txtDebug.Text = txtDebug.Text & vbCrLf & ("ItemClass: " & i.ItemClass)
    Next


    MCSE 2003 / MCSA 2003 Messaging / MCTS: Windows Server 2008 / MCTS: Windows Vista, SQL 2005 / MCTS: Microsoft System Center Operations Manager 2007 / MCITP: Enterprise Administrator / MCITP: Enterprise Messaging Administrator 2007 / 2010 / VCP - VMWare Certified Professional

    Thursday, July 12, 2012 12:22 PM

Answers

All replies

  • In the SearchFilterCollection code, you have "Shedule" instead of "Schedule"

    Mobile OWA For Smartphone
    www.leederbyshire.com
    email a@t leederbyshire d.0.t c.0.m

    • Marked as answer by Andres Bohren Thursday, July 12, 2012 2:07 PM
    Thursday, July 12, 2012 2:03 PM
  • Thank's Lee

    I am so fucking Blind!!!

    Regards Andres


    MCSE 2003 / MCSA 2003 Messaging / MCTS: Windows Server 2008 / MCTS: Windows Vista, SQL 2005 / MCTS: Microsoft System Center Operations Manager 2007 / MCITP: Enterprise Administrator / MCITP: Enterprise Messaging Administrator 2007 / 2010 / VCP - VMWare Certified Professional

    Thursday, July 12, 2012 2:07 PM
  • I think we've all done it :-)

    Mobile OWA For Smartphone
    www.leederbyshire.com
    email a@t leederbyshire d.0.t c.0.m

    Thursday, July 12, 2012 2:54 PM