![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have a custom addin that runs code when the mailitem.send event is fired, however in certain cases the mailitem.send is not fired and it skips to the application.itemsend event and i don't know why.
Here's the scenario. Compose a new email click "send", mailitem.send event is fired but due to custom code it appropriately cancels the event. I then click "send" again, the mailitem.send event is skipped and the application.itemsend event fires. I don't want to have any custom code behind the application.item send. I can run the same scenario on different machines and only find the problem with one configuration but I can't figure out what it could be. This problems occurs on specific Windows XP/Outlook 2003 machines. Any help would be apprecatied. |
Ads |
#2
|
|||
|
|||
![]()
It sounds to me like you're releasing something after that first Send()
event so your event handler is going out of scope or being garbage collected. Check for that in your code. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "amh" wrote in message ... I have a custom addin that runs code when the mailitem.send event is fired, however in certain cases the mailitem.send is not fired and it skips to the application.itemsend event and i don't know why. Here's the scenario. Compose a new email click "send", mailitem.send event is fired but due to custom code it appropriately cancels the event. I then click "send" again, the mailitem.send event is skipped and the application.itemsend event fires. I don't want to have any custom code behind the application.item send. I can run the same scenario on different machines and only find the problem with one configuration but I can't figure out what it could be. This problems occurs on specific Windows XP/Outlook 2003 machines. Any help would be apprecatied. -- amh |
#3
|
|||
|
|||
![]()
Ken,
If it was code I should have the same problem across all the machines. Again it's just specific to one XP/Outlook 2003 machine. If I create a new email, enter "abc" in the to: field then click send, the outlook send event runs first before our custom code and notifies me I have an invalid recipient, I fix it and then click send again and my custom code never fires. So it seems whether it's Outlook canceling the send or our custom code canceling the send, the next time the send button is clicked our code is never called again. Let me know if you have any additional insight. Just to reiterate it's specific to a machine. I have 5 machines running xp/Outlook 2003 and 5 running vista/Outlook 2007 and the issue only occurs on one of the xp machines. Quote:
|
#4
|
|||
|
|||
![]()
Does the addin code run at all after that on that machine, or is the addin
getting disabled by an unhandled exception? If you open another item and send it does the code fire? If not that would indicate an unhandled exception as in my first question or something going out of scope. Other than some rogue software on that machine that's all I can think of. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "amh" wrote in message ... Ken, If it was code I should have the same problem across all the machines. Again it's just specific to one XP/Outlook 2003 machine. If I create a new email, enter "abc" in the to: field then click send, the outlook send event runs first before our custom code and notifies me I have an invalid recipient, I fix it and then click send again and my custom code never fires. So it seems whether it's Outlook canceling the send or our custom code canceling the send, the next time the send button is clicked our code is never called again. Let me know if you have any additional insight. Just to reiterate it's specific to a machine. I have 5 machines running xp/Outlook 2003 and 5 running vista/Outlook 2007 and the issue only occurs on one of the xp machines. |
#6
|
|||
|
|||
![]()
All I can say is if this is on just one machine that the only way to
ultimately figure it out will be to compare the differences on that machine and try to eliminate them one by one until you narrow it down. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "amh" wrote in message ... Yes the addin still runs. I can open another email or several emails at one time and the addin still runs. It's quite strange so I was hoping someone had come across this issue before. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Memory with MailItem.Send | Nathan | Outlook and VBA | 1 | June 25th 09 04:24 PM |
Reading mailitem after mail is send give runtime error. | JIGNESH | Add-ins for Outlook | 1 | May 7th 09 02:38 PM |
Exception thrown on MailItem.Send | bstrum | Add-ins for Outlook | 3 | June 5th 07 03:54 PM |
Automate Spell Check on MailItem.Send() ??? | Brian McCullough | Add-ins for Outlook | 1 | March 30th 07 02:18 PM |
Losing handle to MailItem when send | donald | Add-ins for Outlook | 8 | February 1st 06 06:09 PM |