views:

454

answers:

1

hi,

I have a handle that fires when the ItemAdd event is triggered on the Sent Items folder in outlook. This handle prompts the user and depending on their selection then opens a custom windows form to save the sent email.

Now ... heres what happens ...

  • The prompt shows fine when an item is placed into the Sent Items folder, if you dismiss it it will show again fine the next time the event is triggered, and so on.
  • If you accept the prompt, the windows form shows and are able to save the email. But the next time an email is placed into the sent items folder the event doesnt fire, and hence the prompt doesnt even show!
  • if i put the same handle on Outlooks OnSend event instead of on the ItemAdd for the sent items folder all works just the same, except after the windows form is loaded the first time it will continue to be loaded (ie the event fires and is handled) perfectly the next time you want it to.

It appears showing the windows form for some reason causes either the event to stop firing or the handle to drop off the sent items folder (but only the sent items folder). The latter being more likely i think. I have an idea for a work around but im not really a fan of work arounds if i can get away with it.

Would anybody know what might be going on here?

Many thanks in advance to any thoughts people may have.

Cheers, Stuv

A: 

I had a similar problem. It sounds like one of your variables is getting garbage collected. If you can post some code I might be able to help you.