Outlook message date

Add-in Express™ Support Service
That's what is more important than anything else

Outlook message date
I need to be able to retrieve the outlook message date 
Eric F




Posts: 1
Joined: 2005-06-19
I have recently purchased Add-in Express .NET, and really enjoy it. However, even after playing with the samples all weekend i still can not retrieve any other MAPI properties other then the PR_BODY and such that i saw in the sample. I have spent all weekend searching the internet, and on MSDN database. But to no avail, i still can't get it to work.

For example: PR_MESSAGE_DELIVERY_TIME

Could you please give me some sample code or point me in the right direction. This is urgent, i need to finish this project.

Thank you very much!
-Eric
Posted 19 Jun, 2005 22:42:17 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Eric.
I suppose you have ran our ADX Toys for Outlook. If so, you can add the following code to the ADX Toys project to obtain the delivety time of a message:

private class MAPI
{
...
public const uint PT_SYSTIME = 64;
public const uint PR_MESSAGE_DELIVERY_TIME = ((((uint)(0x0E06))<<16)|((uint)(64)));
...
}

private void btnShowIH_Click(object sender)
{
...

//Put this code into the btnShowIH_Click procedure after setting the
//iheader variable to the message header.

MAPI.HrGetOneProp(unk, MAPI.PR_MESSAGE_DELIVERY_TIME, out pPropValue);
propValue = (MAPI.SPropValue)Marshal.PtrToStructure(pPropValue, typeof(MAPI.SPropValue));
DateTime deliveryTime = DateTime.FromFileTime(propValue.Value);
iheader += "\r\n";
iheader += "Delivery Time is " + deliveryTime.ToString();

...
}
Posted 20 Jun, 2005 10:22:44 Top