【发布时间】:2020-06-26 15:37:28
【问题描述】:
我有一个位于下方的小脚本,用于从包含主题中特定单词的电子邮件中下载附件。
它运行了一段时间,但最近我遇到了间歇性问题,无法下载附件。
我开始认为问题是规则而不是脚本。
Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "path where to save file"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\inventory.csv"
Set objAtt = Nothing
Next
End Sub
这是规则:
Apply this rule after the message arrives
with CPN in the subject
and on this computer only
run Project1.saveAtachtoDisk
你们是我最后的希望,因为没有其他人可以帮助我。
【问题讨论】: