How to void missing message when using olInboxItems_ItemAdd event

V

VBA question

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top