none
Replying/Forwarding emails in Reading Pane does not trigger NewMail(dispid -61443) event. RRS feed

  • Question

  • Replying/Forwarding emails in Reading Pane does not trigger NewMail(dispid -61443) event. When I click on "Pop Out" in reading pane, I get NewMail event. Also when I reply/forward in new window, I get this event. I need to get the notification when user reply/forward an email and I need to modify the email. So, I need to get Outlook::_MailItem  when I get the notification.i am trying in Outlook 2016. 

    Thanks in Advance!

    Thanks,

    Regards,

    Bharath

    Thursday, February 22, 2018 8:58 AM

Answers

  • I cannot reproduce that problem. If I have an inline response active, NewMail and NewMailEx events fire as expected.

    I see the following events fire in OutlookSpy (click Application button, go to the Events tab, looks at the log at the bottom of the page):

    ItemLoad (IDispatch)
    NewMailEx (000000005E81754F003E1549B0659F2AEA92E7C20700C7CF2304C77BF64585E8892DD6FF7BAC00000000010C00004A7CE85ED1AB274C9E20AA3CBFA828B1000181D0CAA30000)
    NewMail ()
    ItemLoad (IDispatch)
    ItemLoad (IDispatch)
    ItemLoad (IDispatch)
    ItemLoad (IDispatch)


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, February 22, 2018 2:28 PM
  • Hello Bharath Amarnath,

    >>Replying/Forwarding emails in Reading Pane does not trigger NewMail(dispid -61443) event.

    I'm wondering what's NewMail(dispid -61443) event you mean. I know NewMail Event, but it occurs while receiving mails in Inbox. I failed to trigger it in any way of replying/forwarding a mail. Did I misunderstanding any thing?

    Except the NewMail event, what about using MailItem.Reply Event and MailItem.Forward Event ?

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Saturday, February 24, 2018 2:21 AM
  • Hello Terry and Dmitry,

    I am very sorry for the confusion. Yes, reply/forward should trigger Reply(62566 ) and Forward(62568). Outlook Spy helped me to understand this. The reason why these were not triggered in my plugin because I had not registered for the mail events. As a fix, I am using Explorer's selection change event to get Outlook::_MailItem and register for the notification for the selected Item.

    Thanks a lot Terry and Dmitry for helping me.


    Friday, March 2, 2018 4:52 PM

All replies

  • I cannot reproduce that problem. If I have an inline response active, NewMail and NewMailEx events fire as expected.

    I see the following events fire in OutlookSpy (click Application button, go to the Events tab, looks at the log at the bottom of the page):

    ItemLoad (IDispatch)
    NewMailEx (000000005E81754F003E1549B0659F2AEA92E7C20700C7CF2304C77BF64585E8892DD6FF7BAC00000000010C00004A7CE85ED1AB274C9E20AA3CBFA828B1000181D0CAA30000)
    NewMail ()
    ItemLoad (IDispatch)
    ItemLoad (IDispatch)
    ItemLoad (IDispatch)
    ItemLoad (IDispatch)


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, February 22, 2018 2:28 PM
  • Hello Bharath Amarnath,

    >>Replying/Forwarding emails in Reading Pane does not trigger NewMail(dispid -61443) event.

    I'm wondering what's NewMail(dispid -61443) event you mean. I know NewMail Event, but it occurs while receiving mails in Inbox. I failed to trigger it in any way of replying/forwarding a mail. Did I misunderstanding any thing?

    Except the NewMail event, what about using MailItem.Reply Event and MailItem.Forward Event ?

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Saturday, February 24, 2018 2:21 AM
  • Terry,

    COM events under the hood are implemented via IDispatch::Invoke (where IDispatch is provided by the subscriber). Each event has a unique dispid which is passed as a parameter to  IDispatch::Invoke. That is how COM events are handled in C++.

    NewMail dispid is 61443. NewMailEx is 64181.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Sunday, February 25, 2018 5:01 AM
  • Hello Terry and Dmitry,

    I am very sorry for the confusion. Yes, reply/forward should trigger Reply(62566 ) and Forward(62568). Outlook Spy helped me to understand this. The reason why these were not triggered in my plugin because I had not registered for the mail events. As a fix, I am using Explorer's selection change event to get Outlook::_MailItem and register for the notification for the selected Item.

    Thanks a lot Terry and Dmitry for helping me.


    Friday, March 2, 2018 4:52 PM