Outlook 宏运行两次

Outlook 宏运行两次

我使用宏来自动回复 Outlook 收到的短信。这种方法有效,但每次都会向客户发送两次回复。有什么建议可以阻止这种情况吗?宏如下:

Sub ReplytoMessage(Item As Outlook.MailItem)
Set myReply = Item.Reply
If Item.BodyFormat = olFormatHTML Then
myReply.HTMLBody = "Thank you for your message. We will deal with it shortly." & vbCrLf & myReply.HTMLBody
Else
 myReply.Body = "Thank you for your message. We will deal with it shortly." & vbCrLf & myReply.Body
End If
myReply.Send
End Sub

相关内容