I did the test in an addin I'm working on which happens to use Framework 2.0
and not 3.5. The code was tested on WinXP SP3 and Outlook 2003 SP3.
I'd guess that the connector and hotmail wouldn't make a difference, the
search is being done on a specific folder or folders. I don't use the
connector, are the folders you were searching local in a PST file? If so
then there shouldn't be a difference. I happened to test using a cached
Exchange mailbox.
I wonder if using Application.AdvancedSearch() as a function, as I did might
make a difference. You might try that and see.
I suggested using the Get* functions rather than something like
searchObject[i] just because you don't have to deal with Outlook collections
starting with Item[1] and not Item[0]. One less thing to remember. Not a big
deal, I often use a for loop like yours.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"sb" <(E-Mail Removed)> wrote in message
news:170CA22D-495B-4399-ADE6-(E-Mail Removed)...
> Thank you for your response, Ken.
>
> It seems strange it only happens for me. Are you using .Net 2.0 (as
> opposed
> to the VS2008 default of 3.5)? Also, I am running on Win 7 RC, and the
> email
> accounts in my test config of Outlook are just a couple of hotmail
> addresses
> using Outlook Connector. Not sure why any of these would make any
> difference.
>
> In any event, I finally just solved this problem with an
> Application.DoEvents() call in the event handler. Weird.
>
> Forgive me, I am no Outlook extensibility master. While
> GetFirst()/GetNext() may be better in some way, why would a for() loop not
> work to iterate the results?
>
> thanks