我正在VB.NET中尝试附加到用户帐户中的文件夹中,该文件夹在“说明”字段中具有特定字词。在这种特殊情况下,此文件夹将始终是日历文件夹,但并不总是用户的主日历。
使用搜索过滤器这应该很简单,但要使用一个我需要正确的扩展属性定义。据我所知,这应该是PR_COMMENT_W(0x3004001F),但我似乎无法弄清楚如何使其适应New 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)
答案 0 :(得分:0)
Dim FolderDescription As ExtendedPropertyDefinition = New ExtendedPropertyDefinition(12292, MapiPropertyType.String)
那是有效的=)