views:

327

answers:

3

My company is using Exchange 2003.

Is it possible to query exchange from .NET code to find out if someone's 'Out of Office' assisstant is on or off?

A: 

You may want to look at the WebDAV.NET library from Independentsoft:

I used it at a previous job - it makes working with Exchange much easier. I believe it will do what you want.

http://www.independentsoft.de/webdavex/index.html

Roger
Thanks, but ideally we want to do this without buying 3rd party software.
Kirschstein
A: 

Using the Outlook Redemption library, you can get Out of Office status like this:

public bool IsOutOfOffice()
{
    var outlook = new Microsoft.Office.Interop.Outlook.Application();
    var rdoSession = new Redemption.RDOSession();
    rdoSession.MAPIOBJECT = outlook.Session.MAPIOBJECT;

    Redemption.RDOOutOfOfficeAssistant OOFA = 
        (_rdoSession.Stores.DefaultStore as Redemption.RDOExchangeMailboxStore).OutOfOfficeAssistant

    return OOFA.OutOfOffice;
}

To check another user's status, you need to get the MAPIOBJECT for their mailbox.

Aidan Ryan
A: 

You can find solution here http://i1off.com/Blog.aspx?vw=BlogView&BlogID=13

ikostya