我正在尝试将Outlook.Items对象(objitemsrestricted2)限制为带有附件的电子邮件。我尝试了以下操作,没有错误消息,但没有进行过滤。
query = "@SQL=" & Chr(34) & "urn:schemas:httpmail:hasattachment" & Chr(34) & "=1"
'restrict the set to Emails that have attachments
objitemsrestricted2.Restrict (query)
有人可以看到什么问题吗?
在查询中,使用True
代替1
。