none
How would I find the Original Email? RRS feed

  • Question

  • We have a requirement where some emails responses can only be addressed back to the sender and no one else.

    When you click on Reply you get a new MailItem.    You no longer have access to the properties in the original MailItem.

    I'm overriding the MailItem.Reply event to do my processing.

    My current plan is to 1) Get the current folder from the explorer object, and 2) search the items of that folder for certain properties.


    The problem now is which properties.  "Subject" alone will return multiple items, and I can't use "ConversationIndex" as a filter in a Restrict call.

    are there any other properties I can use to narrow down my search?


    • Edited by GermanEZI Tuesday, August 8, 2017 8:27 PM Grammar and spelling
    Tuesday, August 8, 2017 8:26 PM

Answers

  • To reply to a message, the user needs to either

    1. Select the message in an explorer and clic kReply

    2. Open a message in an inspector and click Reply

    For #1, trap the Explorer.SelectionChange event and set up event sinks on all selected messages (the previous selection must be discarded). Use the MailItem.Reply/ReplyAll events

    For #2, use Application.Inspectors.NewInspector event. Reda the item from the Inspector.CurrentItem property abd watch for the Reply/ReplyAll events.


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

    • Marked as answer by GermanEZI Tuesday, August 8, 2017 9:57 PM
    Tuesday, August 8, 2017 9:06 PM

All replies

  • To reply to a message, the user needs to either

    1. Select the message in an explorer and clic kReply

    2. Open a message in an inspector and click Reply

    For #1, trap the Explorer.SelectionChange event and set up event sinks on all selected messages (the previous selection must be discarded). Use the MailItem.Reply/ReplyAll events

    For #2, use Application.Inspectors.NewInspector event. Reda the item from the Inspector.CurrentItem property abd watch for the Reply/ReplyAll events.


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

    • Marked as answer by GermanEZI Tuesday, August 8, 2017 9:57 PM
    Tuesday, August 8, 2017 9:06 PM
  • Thanks!  I"ve already started down the SelectionChange path.

    I'll try this ASAP

    Tuesday, August 8, 2017 9:50 PM
  • Perfect.  Thank you!
    Tuesday, August 8, 2017 9:57 PM