0

我在 VB.NET 中工作,试图附加到用户帐户中在描述字段中有特定单词的文件夹。在这种特殊情况下,此文件夹将始终是日历文件夹,但并不总是用户的主日历。

使用搜索过滤器应该足够简单,但要使用它,我需要正确的扩展属性定义。据我所知,这应该是 PR_COMMENT_W (0x3004001F),但我似乎无法弄清楚如何使其适应新的 ExtendedPropertyDefinition 类。就像是:

Dim TagComment As ExtendedPropertyDefinition = New ExtendedPropertyDefinition(0x3004001F, MapiPropertyType.String)
Dim view As New FolderView(10)
view.PropertySet = New PropertySet(BasePropertySet.IdOnly)
view.PropertySet.Add(TagComment)
Dim searchFilter As SearchFilter = New SearchFilter.ContainsSubstring(TagComment, "WordToFind")
Dim results As FindFoldersResults = Service.FindFolders(New FolderId(WellKnownFolderName.Root, New Mailbox("EmailAddress")), searchFilter, view)
4

1 回答 1

0
Dim FolderDescription As ExtendedPropertyDefinition = New ExtendedPropertyDefinition(12292, MapiPropertyType.String)

那行得通=)

于 2012-07-27T16:09:38.577 回答