如何阻止或重定向自动回复?

时间:2015-01-19 14:30:43

标签: vba outlook outlook-vba

我的宏正在从某个邮箱向某些收件人列表发送邮件。有些收件人会发送自动回复。

我想阻止自动回复选项。自动回复不同的邮箱对我来说也没问题。

Sub SendEmail(  what_address As String, _
                subject_line As String, _
                mailbox_name As String, _
                mail_body As String )

    Dim olApp As Outlook.Application
    Dim olMail As Outlook.MailItem

    Set olApp = CreateObject("Outlook.Application")
    Set olMail = olApp.CreateItem(olMailItem)

    olMail.To = what_address
    olMail.Subject = subject_line
    olMail.SentOnBehalfOfName = mailbox_name
    olMail.BodyFormat = olFormatHTML
    olMail.HTMLBody = mail_body
    olMail.Send
End Sub

1 个答案:

答案 0 :(得分:0)

Outlook对象模型没有为此提供任何内容。此外,您所谈论的是客户的功能,无法在电子邮件中进行管理或设置。

您可以设置的唯一属性是ReplyRecipients,返回一个Recipients集合,该集合表示Outlook项目的所有回复收件人对象。