Ya thats what I figured but wanted to be sure if there was a better option
existed.
"Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message
news:eahXCDyyIHA.2068@TK2MSFTNGP05.phx.gbl...
If you're searching multiple folders, using Application.AdvancedSearch could
be a better approach. The DASL syntax is a little different; see
http://www.outlookcode.com/news.aspx?id=30 for tips.
You're not going to get an explicit "group by" with any search technique.
What you can do is a second round of searches -- for specific senders --
based on the results set returned by the first search.
"Amiable" <achaudhary311@hotmail.com> wrote in message
news:OA1v%23wxyIHA.5820@TK2MSFTNGP04.phx.gbl...
> Sue, I use exactly that right now, the problem is, I have several folders
> underneath my mailbox root and underneath default folders like inbox, I
> take
> one user at a time and have to iterate though all the folders and items in
> them to find if the user+item+date matches, this serves my purpose but is
> deadly slow when the number of items are many(some 5000), I was hoping if
> there is something like a SQL query which is more efficient than this
> method. See the code below
>
> MySearchCriteria = "[Received] > '" & MyDateStart & "' and [Received] < '"
> &
> MyDateEnd & "'"
> Set MyResultItems = AllInboxItems.Restrict(MySearchCriteria)
> MyResultItems.Sort ("[From]")
>
> This however doesn't give me "group by"
>
> -Am
>
> "Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message
> news:%23petdKwyIHA.3384@TK2MSFTNGP03.phx.gbl...
> You can use the Items.Restrict method to filter by date range -- see
>
http://www.outlookcode.com/article.aspx?id=30 -- and add criteria for the
> sender. The resulting Items collection will have a Count property.
>
> "Amiable" <achaudhary311@hotmail.com> wrote in message
> news:eZASzpuyIHA.2184@TK2MSFTNGP02.phx.gbl...
>> Hi,
>>
>> I want to find out the number of emails sent by a particular user between
>> specific dates and then find sum group by user name.
>> Can anyone help me?
>>
>> A
>>
>>
>
>