Outlook VBA将Outlook.Items对象限制为带有附件的电子邮件

时间:2019-12-23 19:03:47

标签: outlook outlook-vba outlook-2016

我试图将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)

有人可以看到什么问题吗?

1 个答案:

答案 0 :(得分:0)

在查询中,使用True代替1