赎回RDOSearch在Session.Stores.DefaultStore上不可见

时间:2018-08-17 13:21:50

标签: outlook-redemption

我有一个Outlook插件,可以执行非常大的扫描并经常导致Outlook崩溃。我进行了很多搜索,发现应该改用“兑换”。 我已经下载了Redemption 5.17,我试图在Outlook中创建一个搜索文件夹。我遵循文档here

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Searches = Session.Stores.DefaultStore.Searches
for each Search in Searches
    Debug.Print "-------------"
    Debug.Print Search.Name
    Debug.Print Search.SearchCriteria.AsSQL
next

我用VS2017 C#编写代码。我在Session.Stores.DefaultStore上找不到属性Searchs

任何人都可以帮助我如何制作一个复制现有文件夹的搜索文件夹 来自另一个搜索文件夹的SearchCriteria。

1 个答案:

答案 0 :(得分:1)

首先,在外接程序中没有理由使用RDOSession.Logon-您已经有一个Outlook会话:将OOM中的RDOSession.MAPIOBJECT属性设置为Application.Session.MAPIOBJECT

第二,RDOStore2接口公开了Searches属性(请参见http://www.dimastr.com/redemption/rdosearches.htm)-只需将RDOStore对象投射到RDOStore2