E
EclecticMonk
We have an Outlook COM add-in built using C++.
In our OnItemSend handler, we do some processing on attachments which we
really only want to happen once. Normally, this is fine: our OnItemSend
fires just before the item is sent.
However, we've encountered a problem where some customers have another
add-in installed as well as ours. This other add-in also handles OnItemSend,
and in some circumstances it sets the Cancel flag to warn the user that there
is a problem that must be resolved before sending the message.
Here's what happens in these cases:
1. User hits the "Send" button
2. Our OnItemSend fires and we process the attachments.
3. The other add-in's OnItemSend fires and it cancels sending the message
4. Once the user has resolved the problem, they hit "Send" again
5. Our OnItemSend fires AGAIN and we process the attachments
Does anyone know of any way that we can detect that it's the second time our
OnItemSend handler has been called for a particular MailItem? The IDispatch
pointer that gets passed into the handler seems to be different every time,
so it doesn't look like we can determine the MailItem's identity that way.
Any guidance would be very much appreciated.
Thanks in advance.
In our OnItemSend handler, we do some processing on attachments which we
really only want to happen once. Normally, this is fine: our OnItemSend
fires just before the item is sent.
However, we've encountered a problem where some customers have another
add-in installed as well as ours. This other add-in also handles OnItemSend,
and in some circumstances it sets the Cancel flag to warn the user that there
is a problem that must be resolved before sending the message.
Here's what happens in these cases:
1. User hits the "Send" button
2. Our OnItemSend fires and we process the attachments.
3. The other add-in's OnItemSend fires and it cancels sending the message
4. Once the user has resolved the problem, they hit "Send" again
5. Our OnItemSend fires AGAIN and we process the attachments
Does anyone know of any way that we can detect that it's the second time our
OnItemSend handler has been called for a particular MailItem? The IDispatch
pointer that gets passed into the handler seems to be different every time,
so it doesn't look like we can determine the MailItem's identity that way.
Any guidance would be very much appreciated.
Thanks in advance.