I am working in a web application where i am sending mails to employees. I have to send mails to persons whose outlook out of office is set to false. And I need to know one's out of office status. For that I used the following code. By using this I am getting my outlook out of office status. But how can I get other employees Out of office staus? My code is
Code:
OutLook.NameSpace oNS;
OutLook.Stores oStores;
//OutLook.Store oStr;
OutLook.PropertyAccessor oPrp;
OutLook._Application outlookObj = new OutLook.Application();
oNS = outlookObj.GetNamespace("MAPI");
oStores = oNS.Stores;
foreach(OutLook.Store oStr in oStores)
{
if(oStr.ExchangeStoreType == Microsoft.Office.Interop.Outlook.OlExchangeStoreType.olPrimaryExchangeMailbox)
{
oPrp = oStr.PropertyAccessor;
bool OutOfOffice = (bool) oPrp.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x661D000B");
}
}
Comment