BeforeItemEvent of Folder

N

Neetu

I have attached BeforeItemEvent with folder .
On this event some code has been written to allow Mail item to add into our
custom folder
we have attach Item_add event to our custom folders.

we are facing a issue
if we are trying to move 5 items from other folders like inbox then out of 5
only 4 is being add to our custom folder. we put a debugger and seen that for
last mail item ItemAdd event is not fired. when we removed BeforeItemevent
from selected folder then all mails selected from inbox get moved to custom
folder.

we have seen this issue not frequent but it happens.

Is this is issue because we are trying to add multilple mailitems and in
between we are interupting ItemAdd event with beforeItemMove event so time
period get lapsed before calling last add item event for last mail Item.

Is fix ?
 
K

Ken Slovak - [MVP - Outlook]

I assume that you really mean the BeforeItemMove event and not
BeforeItemEvent, whatever that is?

Any event handler is like an interrupt handler for a microprocessor. If you
take too long to handle the event you might miss the next iteration of that
event or other events that fire. So don't handle BeforeItemMove or make your
code shorter and faster. That's the fix.
 
N

Neetu

Thanks Ken

Ken Slovak - said:
I assume that you really mean the BeforeItemMove event and not
BeforeItemEvent, whatever that is?

Any event handler is like an interrupt handler for a microprocessor. If you
take too long to handle the event you might miss the next iteration of that
event or other events that fire. So don't handle BeforeItemMove or make your
code shorter and faster. That's the fix.
 

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