Programmatically retrieve Reply/Forward flag status & timestamp

T

teochevon

I'd like to programmatically retrieve Reply/Foward flag status as well as
timestamp respectively from Outlook mail item. Is that possible? I need this
urgently for my project coding development. Please help!
 
K

Ken Slovak - [MVP - Outlook]

What timestamp, when the item was received or sent? For received time use
the ReceivedTime property of the item, for the time it was sent use the
SentOn property.

To retrieve the last action taken on an email item you must use a lower
level API such as Redemption (www.dimastr.com/redemption) or CDO 1.21 (not
supported for managed code and subject to the Outlook security) or Extended
MAPI (unmanaged C++ or Delphi only), or some other MAPI wrapper such a
MAPI33.

Only the last action taken is available, there is no history of actions, so
a forward followed by a reply will only show the reply.

The property to look at in that case is PR_LAST_VERB_EXECUTED (property tag
0x10810003), which can be one of 3 PT_LONG (32-bit int) values:

EXCHIVERB_REPLYTOSENDER == 102
EXCHIVERB_REPLYTOALL == 103
EXCHIVERB_FORWARD == 104
 
T

teochevon

Thanks for your reply, Ken.

I'd like to retrieve the timestamp of when does a mail item being replied or
forwarded to intended recipients. My program is intended to keep track of the
number of mail items replied/forwarded as well as when the users did so.
There is a workaround that I found, which is to use the LastModificationTime
property of the mail item to capture when did the mail item being replied or
forwarded or moved to another folder and so forth, but as you've mentioned:
Only the last action taken is available, there is no history of actions, so a
forward followed by a reply will only show the reply, hence this does not
fulfill what I need.

It sounds like lower API is not supported in .NET, what's the worst thing
can happen if I'm using it? I'm not fully understand on this. Hope you can
explain more.

Thanks ahead!

Cheers,
Chevon
 
K

Ken Slovak - [MVP - Outlook]

I use Redemption myself in all my code, managed and unmanaged. I believe
that MAPI33 is also OK in managed code, although I've never used it.

The problem with using something like CDO 1.21 or Extended MAPI (C++ or
Delphi only anyway) in managed code is incompatibility of memory handling.
You can get lots of memory leaks and crashes, and even if it works sometimes
it will be guaranteed to break when you do a rollout to your most important
customer. Then you're unsupported and no one will be able to help, other
than telling you not to use those API's to begin with.
 
T

teochevon

Thanks for your quick reply, Ken.

Let me try to look deeper into Redemption & MAPI33 to see whether or not the
things I want can be retrievable.

Thanks a bunch!

Cheers,
Chevon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top