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

问题描述 投票:0回答:1

我正在尝试将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)

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

outlook outlook-vba outlook-2016
1个回答
0
投票

在查询中,使用True代替1

© www.soinside.com 2019 - 2024. All rights reserved.