locked
How to find out if Outlook mail is forwarded, replied? RRS feed

  • Question

  • Hello everyone,

     

    I'm developing Outlook addin.

    I'm trying to read some properties about MailItem.

    However, I can't find out if MailItem is Replied and if is Forwarded.

    If anyone knows how can this be read?

     

    Thanks.

    Friday, May 25, 2007 9:43 AM

Answers

  • That information cannot be obtained using the Outlook object model in versions before Outlook 2007. Instead, you need to access the MAPI property PR_LAST_VERB_EXECUTED (0x10810003). Helmut's sample at http://www.outlookcode.com/codedetail.aspx?id=1112 shows how to use C# to access a MAPI property.
    Saturday, May 26, 2007 3:21 PM

All replies

  • Please clarify: Are you trying to determine whether an individual message is itself  a reply or forward to some other message? Or do you want to know whether the message has been replied to or forwarded?

     

    The version of Outlook you're writing code for is also relevant.

    Friday, May 25, 2007 12:51 PM
  • Hello,

     

    I forgot to mention. Version of Outlook is 2003.

    I'm trying to determine whether the message has been replied to or forwarded.

    Can you give me some hints?

     

    Thanks.

     

    Saturday, May 26, 2007 10:53 AM
  • That information cannot be obtained using the Outlook object model in versions before Outlook 2007. Instead, you need to access the MAPI property PR_LAST_VERB_EXECUTED (0x10810003). Helmut's sample at http://www.outlookcode.com/codedetail.aspx?id=1112 shows how to use C# to access a MAPI property.
    Saturday, May 26, 2007 3:21 PM
  • Hello.

    Thank you for your help so far.

     

    However, using PR_LAST_VERB_EXECUTED (0x10810003) over the

    MailItem which is replied (it has that little purple arrow in Outlook),

    I've got an Integer number that has value of 102.

    I also tried the PR_TRANSPORT_MESSAGE_HEADERS (0x007D001E) and I've got

    a string that has all message header data. (this only for testing)

     

    So, what does 102 represent?

    How can I distinguish 'Replied' and 'Forwarded' from this?

     

    Thanks

     

     

    Saturday, May 26, 2007 9:38 PM
  • You have all the information you need to answer your own question: A value 102 means the last action on the message was a reply. Compare a forwarded message, and you'll have the other value that interests you.
    Saturday, May 26, 2007 9:55 PM
  • Thank you, I appreciate your help.

     

    Does this property retrieves only the last action?

    What if message was replied, than forwarded, could this retrieve replied than?

     

    Thanks.

     

     

    Saturday, May 26, 2007 10:40 PM
  • Yes, Outlook stores information only about the most recent action. In your scenario, there would be no record of a reply, unless there was an item in the Sent Items folder with the same ConversationTopic, a longer ConversationIndex, and recipients that match the original
    Saturday, May 26, 2007 11:14 PM
  • I thought that was the case because Outlook changes icon of a message

    to the last action performed ('Reply', 'Reply To All' or 'Forward' icons).

     

    Again, Thank you for your help, I appreciate it.

     

    Saturday, May 26, 2007 11:37 PM