You can't if you are using the Outlook object model.
That status is calculated from the MAPI property PR_LAST_VERB_EXECUTED
(0x10810003), which in the case of a reply would be 102
(EXCHIVERB_REPLYTOSENDER).
...
You would have to use a lower level API such as Extended MAPI (unmanaged C++
or Delphi only) or something like Redemption (
www.dimastr.com/redemption) to
change that property value.
Thank you for the reply.
I already thought of redemption and downloaded it, but I gave up because
I only found examples in which a property is retrieved (e.g. your post
at
http://www.eggheadcafe.com/software...ieve-replyforward-flag-status--timestamp.aspx
)
I also found and modified an example how to use redemption, but I do not
understand how to change the "replied" property.
In some postings it is said that this property isn't present if the
message was never replied to - would that mean that I have to delete
this property to make the message "unreplied"?
My first attempt (yet incomplete):
Public Sub Make_Unreplied()
Dim Mail As Redemption.rdoMail
Dim Session As Redemption.RDOSession
Const PR_LAST_VERB_EXECUTED = &H10810003
Set Session = CreateObject("redemption.rdoSession")
Session.MapiObject = Application.Session.MapiObject
' assumed that a received message is selected
With Application.ActiveExplorer.Selection(1)
Set Mail = Session.GetMessageFromID(.EntryID, .Parent.StoreID)
' next line should modify the status, but how?
??? Set Mail.Fields(PR_LAST_VERB_EXECUTED) = <???>
End With
' Is it necessary to save the MapiObject after modifying it?
End Sub
Regards