Advanced Search API for Exchange not giving proper results

Hi ,

I have written a code to find out the number of mails recieved during a time period in a certain folder. I am using Application.AdvancedMethod search to get the output.

Below is the filter passed to the method along with folder path as scope which i am selecting using pickfolder method.

filter="urn:schemas:httpmail:datereceived > '" + startDate.Value.Date + "' AND urn:schemas:httpmail:datereceived < '" + endDate.Value.AddDays(1).Date+ "'";

I have folder structure from 2005 to 2015. For all the folders i have around 4000+ mails . The problem is that the method returns 0 results for all folders except 2014 and 2015. Even for 2014 and 2015 folders, it returns incorrect number. I am using Outlook 2013 with Exchange Server 2013. Please let me know if anyone knows the solution.<o:p></o:p>

Thanks.

May 11th, 2015 6:34am

Can anyone help with this?
Free Windows Admin Tool Kit Click here and download it now
May 11th, 2015 12:32pm

Found the solution. The data had to be downloaded once for all folders and them cached exchange mode enabled.
  • Marked as answer by hsharma1986 13 hours 46 minutes ago
July 13th, 2015 1:41pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics