mailitem Send issue

Status
Not open for further replies.
A

amh

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
 
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.

"amh" <amh.4e34546@outlookbanter.com> wrote in message

news:amh.4e34546@outlookbanter.com...

> 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
 
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.

' - [MVP - Outlook Wrote:
> ;321285']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.

> >

>

> "amh" amh.4e34546@outlookbanter.com wrote in message
> news:amh.4e34546@outlookbanter.com...-

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


amh
 
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.

"amh" <amh.4f565df@outlookbanter.com> wrote in message

news:amh.4f565df@outlookbanter.com...

> 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.
 
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.

' - [MVP - Outlook Wrote:
> ;323318']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.

> >

>

> "amh" amh.4f565df@outlookbanter.com wrote in message
> news:amh.4f565df@outlookbanter.com...-

> 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.-


amh
 
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.

"amh" <amh.4f60ea0@outlookbanter.com> wrote in message

news:amh.4f60ea0@outlookbanter.com...

> 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.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
J Outlook 2007 crashed when pushing send on a displayed mailitem Outlook VBA and Custom Forms 1
N Memory with MailItem.Send Outlook VBA and Custom Forms 1
S Reading mailitem after mail is send give runtime error. Outlook VBA and Custom Forms 1
P MailItem.To Property with VBA not work Outlook VBA and Custom Forms 2
G Event when creating task from mailitem Outlook VBA and Custom Forms 2
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
U Outbox Message Stuck after reading some MailItem Properties with VBA Outlook VBA and Custom Forms 1
oliv- Best practice for catching mailitem.events Outlook VBA and Custom Forms 0
oliv- How to select an mailitem in explorer with "show as conversation" Outlook VBA and Custom Forms 8
JorgeDario How to capture and save the text, when responding a MailItem? Outlook VBA and Custom Forms 3
JorgeDario how to check a MailItem has a digital signature (SMIME) with vba? Outlook VBA and Custom Forms 1
JorgeDario ¿What property of mailitem can be used like primary key? Outlook VBA and Custom Forms 6
S Outlook VBA rule script to process both MailItem and MeetingItem Using Outlook 0
B right click outlook objects in OL2010 acts on current inbox mailitem Using Outlook 6
C MailItem Find method doesn't work Using Outlook 0
C MailItem.SaveAs not working Outlook VBA and Custom Forms 10
G RE:The signature is also inserted if you touch the MailItem. Outlook VBA and Custom Forms 1
B Add signature to MailItem Outlook VBA and Custom Forms 3
C How can I create a new MailItem inside a user folder? Outlook VBA and Custom Forms 4
S Create a new Outlook MailItem in an Outlook folder(not a draft) Outlook VBA and Custom Forms 2
A How to get OOM MailItem Raw data Outlook VBA and Custom Forms 2
S Saved Property of MailItem is copied Outlook VBA and Custom Forms 1
S MailItem Find Method question Outlook VBA and Custom Forms 6
N Getting the attachments in MailItem Outlook VBA and Custom Forms 1
T How to get MailItem.Body without security warning in Outlook 2010 Outlook VBA and Custom Forms 2
S ->[O2007] Parsing each line of a MailItem HTMLBody? Outlook VBA and Custom Forms 2
T How to get Inspector or MailItem from wordEditor Outlook VBA and Custom Forms 6
A Select the position of an attached file in a HTML mailitem Outlook VBA and Custom Forms 1
M MailItem object has no property for when a reply was sent Outlook VBA and Custom Forms 3
B Insert information to MailItem Outlook VBA and Custom Forms 1
E Properties added to MailItem in ItemSend event visible to recipien Outlook VBA and Custom Forms 1
V Setting HTMLBody of new mailItem Outlook VBA and Custom Forms 1
V How to find mailitem in the inspector is a brand new one Outlook VBA and Custom Forms 2
M Activate "Add digital signature to this massage" on a MailItem? Outlook VBA and Custom Forms 1
K importing EML in MailItem Outlook VBA and Custom Forms 1
M Get email address from MailItem.To? Outlook VBA and Custom Forms 6
S UserProperties of MailItem object. Outlook VBA and Custom Forms 3
R How to capture a Mailitem Event Outlook VBA and Custom Forms 3
S get current position in message body of mailitem Outlook VBA and Custom Forms 8
S How to get RFC822 format message from the MailItem object. Outlook VBA and Custom Forms 4
J Toolbar button to process current mailitem Outlook VBA and Custom Forms 1
D MailItem from an RSS feed Outlook VBA and Custom Forms 2
P Adding a button in a mailitem Outlook VBA and Custom Forms 1
D Max. length of MSO MailItem.EntryID Outlook VBA and Custom Forms 6
R MailItem.Display() error Outlook VBA and Custom Forms 1
R Clone mailitem Outlook VBA and Custom Forms 5
R MailItem Outlook VBA and Custom Forms 2
D Length of the MailItem.EntryID Outlook VBA and Custom Forms 2
M What is the recommendet way to read/write a user defined Field (Named Property) in the MailItem Obje Outlook VBA and Custom Forms 1
M What is the recommendet way to read/write a user defined Field (Named Property) in the MailItem Obje Outlook VBA and Custom Forms 5

Similar threads

Back
Top