How to void missing message when using olInboxItems_ItemAdd event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Experts,
I am worrying about such problem "if your ItemAdd code takes too long to run
you'll miss subsequent events while you are in that event handler." which
mean I could miss some files if I save each incoming attachment file whenever
ItemAdd event are fired.

I read some suggestions from Ken Slovak. one of them is:
"You can also add a user property to each item that's processed and then
search for that user property at intervals in the Inbox.Items collection.
That's very quick since your search filter will only return items that
haven't been processed already."

I believe this is best way to solve such problem so far, but I have no idea
how to implement it. for example, how can I add a user property to each mail
item and how to check it, how to search at intervals?

Please advise and many thanks.
Shu
 
To search at intervals you can use a timer control or set up a Win32 timer.
When the timer fires you can do your check.

To add a user property to an item:

Item.UserProperties.Add

See the Object Browser help for the arguments you would use.
 
Back
Top