我正在尝试通过主题行解析未读和已阅读电子邮件的收件箱。 但是,当我仅通过主题行解析时,过滤器仅返回读取的电子邮件。
'Filters inbox by subject line (only returns READ emails)
strFilter = "@SQL=" & Chr(34) & "urn:schemas:httpmail:subject" & Chr(34) & " LIKE '%M4 Vitals Grade%'"
'Returns Entire Inbox (READ AND UNREAD emails)
strFilter2 = "@SQL=" & Chr(34) & "urn:schemas:httpmail:read" & Chr(34) & "=True"
'Does not work...
strFilter3 = "@SQL=" & Chr(34) & "urn:schemas:httpmail:subject" & Chr(34) & " LIKE '%M4 Vitals Grade%' WHERE " & Chr(34) & "urn:schemas:httpmail:read" & Chr(34) & " = true"
Set filteredItems = objFolder.Items.Restrict(strFilter)
如果您需要更多信息,请告诉我们!谢谢
答案 0 :(得分:0)
尝试以下方法:
strFilter =" & Chr(34) & "urn:schemas:httpmail:subject" & Chr(34) & " LIKE '%M4 Vitals Grade%' AND [UnRead] = True"