我有这个VBA代码,我将其附加到规则中,以便在到达时自动打印.pdf附件和电子邮件。如果成功打印,是否可以添加标志?
Bearer
答案 0 :(得分:0)
试试这个:
If oMail.Categories <> "Printed" Then
Case ".pdf"
sFile = sDirectory & oAtt.FileName
oAtt.SaveAsFile sFile
oMail.PrintOut
oMail.Categories = "Printed"
oMail.Save
ShellExecute 0, "print", sFile, vbNullString, vbNullString, 0
End Select
Next
Else
MsgBox "It was already printed"
End If