Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/331.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Outlook赎回:如何在c中从Outlook访问规则或规则#_C#_Outlook_Interop_Outlook Redemption - Fatal编程技术网

C# Outlook赎回:如何在c中从Outlook访问规则或规则#

C# Outlook赎回:如何在c中从Outlook访问规则或规则#,c#,outlook,interop,outlook-redemption,C#,Outlook,Interop,Outlook Redemption,我正在使用Outlook redemption从Outlook访问所有规则。 我们如何使用c#中的Outlook Redemption获取RDORules? 我已尝试使用以下代码访问此文件 Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application(); Microsoft.Office.Interop.Outlook._NameSpace ns = app

我正在使用Outlook redemption从Outlook访问所有规则。 我们如何使用c#中的Outlook Redemption获取RDORules? 我已尝试使用以下代码访问此文件

Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook._NameSpace ns = app.GetNamespace("MAPI");

Redemption.RDOSessionClass rdoSession = new Redemption.RDOSessionClass();
                rdoSession.MAPIOBJECT = ns.MAPIOBJECT;

rdoSession.Stores.DefaultStore.Rules - Here Rules property not exist.
原因是RDOExchangeStore对象中存在
rdoSession.Stores.DefaultStore
return RDOStore对象和Rules属性

我无法访问RDOExchangeStore对象。因为商店的种类是 “skPstUnicode”
有什么方法可以访问RDORules吗?

这里可能有一些东西。。您是否已遍历存储以查找exchange存储?看起来您没有连接到exchange,或者默认存储配置为PST

更新:回答您的额外问题

只要在线,您就可以直接对Exchange服务器(即outlook的外部)使用RDO

Redemption.RDOSession RDOSession=新的Redemption.RDOSession(); 在RDOSession对象上使用登录方法