简体   繁体   English

使用.NET获取Outlook Out of Office标志

[英]Getting the Outlook Out of Office flag with .NET

My company is using Exchange 2003. 我的公司正在使用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? 是否可以从.NET代码查询交换,以查明某人的“外出”助手是否开启或关闭?

Using the Outlook Redemption library, you can get Out of Office status like this: 使用Outlook Redemption库,您可以获得这样的Out of Office状态:

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. 要检查其他用户的状态,您需要为其邮箱获取MAPIOBJECT

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过移动设备将Outlook设置为不在办公室 - Setting Outlook out of office from a mobile 当 outlook 设置为“外出”时,关闭 email 通知 - Turn off email notifications when outlook is set to “Out of Office” (.NET)哪些类实现Microsoft.Office.Interop.Outlook.TimeZone - (.NET) What classes implement Microsoft.Office.Interop.Outlook.TimeZone .net 内核中的 Microsoft.Office.Interop.Outlook 错误 - Microsoft.Office.Interop.Outlook error in .net core 为什么不在ASP.NET中运行Microsoft.Office.Interop.Outlook? - Why not running Microsoft.Office.Interop.Outlook in asp.net? 如何使用C#从邮件标头中找出外出标志 - How to find out Out Of Office flag from a mail header using C# 从联系人组中获取Outlook联系人 - Getting outlook contacts out of a contact group Outlook API或使用Microsoft.Office.Interop.Outlook-在C#中获取会议室/位置 - Outlook APIs OR Using Microsoft.Office.Interop.Outlook - Getting meeting room/location in C# C# Microsoft.Office.Interop.Outlook 获取通讯组的所有者 - C# Microsoft.Office.Interop.Outlook Getting Owner of Distribution Group 在Office 365 Outlook(c#)中获取实际发件人的“已发送邮件”文件夹 - Getting the actual sender's “sent items” folder in Office 365 Outlook (c#)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM