A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

mailitem Send issue



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 1st 09, 08:19 PM
amh amh is offline
Junior Member
 
First recorded activity at Outlookbanter: Jul 2009
Posts: 8
Default mailitem Send issue

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  
Old September 2nd 09, 02:11 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default mailitem Send issue

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  
Old September 15th 09, 02:33 PM
amh amh is offline
Junior Member
 
First recorded activity at Outlookbanter: Jul 2009
Posts: 8
Default

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:
Originally Posted by Ken Slovak - [MVP - Outlook] View Post
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
  #4  
Old September 15th 09, 06:28 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default mailitem Send issue

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.


  #5  
Old September 16th 09, 01:26 AM
amh amh is offline
Junior Member
 
First recorded activity at Outlookbanter: Jul 2009
Posts: 8
Default

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.



Quote:
Originally Posted by Ken Slovak - [MVP - Outlook] View Post
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  
Old September 16th 09, 02:26 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default mailitem Send issue

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 12:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.