Advanced Search in outlook

Hi ,<o:p></o:p>

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.<o:p></o:p>

Below is the filter passed to the method along with folder path as scope which i am selecting using pickfolder method.<o:p></o:p>

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

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.<o:p></o:p>

May 8th, 2015 8:53am

I recommend that you post this in the Development Forum:  http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads

Free Windows Admin Tool Kit Click here and download it now
May 8th, 2015 12:40pm

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

Other recent topics Other recent topics