none
Outlook.Application.AdvancedSearch "The operation failed" error RRS feed

  • Question

  • Hi, I am using Outlook.Application.AdvancedSearch function to find mails with filter like this   "urn:schemas:httpmail:datereceived <='{0}'" and generally all work fine (in other users), but in one of the members there is an error: "The operation failed", may be anyone know what it can be? May be some special setting in outlook ?

    p.s. Sorry for my bad English.

    • Edited by Mickael-M-V Monday, September 23, 2013 1:36 PM
    Monday, September 23, 2013 1:21 PM

All replies

  • How do you format the argument?

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

    Monday, September 23, 2013 4:49 PM
  • This is full cod Outlook.Application.AdvancedSearch(fldr, filter, false, advancedSearchTag)

    where:

    string fldr = "'\\usermail@mail.ru\Inbox','\\usermail@mail.ru\Sent Items','\\usermail@mail.ru\Suggested Contacts'";

    string filter = "urn:schemas:httpmail:datereceived >= '18.09.2013 7:10";

    string advancedSearchTag = "24.09.2013 12:20:54";

     

     

    Tuesday, September 24, 2013 5:34 AM
  • What is the user locale on the problematic machines?

    Are you use '18.09.2013 7:10" is the correctly formatted date/time value for that locale?


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

    Tuesday, September 24, 2013 1:59 PM
  • I think ше is the correctly formatted date/time value for that locale, because we use DateTime.ToString("g") - he convert datetime to current culture.
    • Edited by Mickael-M-V Tuesday, September 24, 2013 5:25 PM
    Tuesday, September 24, 2013 3:56 PM