将完整标记添加到电子邮件中

时间:2017-09-21 17:28:17

标签: vba outlook-vba

我有这个VBA代码,我将其附加到规则中,以便在到达时自动打印.pdf附件和电子邮件。如果成功打印,是否可以添加标志?

Bearer

1 个答案:

答案 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