【发布时间】:2020-06-23 08:42:53
【问题描述】:
我正在创建一个宏,当用户单击“回复”按钮回复电子邮件时,它会拦截回复事件并修改回复的密件抄送/主题/正文。
密件抄送和主题正在修改,但正文不想更改。
这是我正在使用的宏:
Private WithEvents oExpl As Explorer
Private WithEvents oItem As mailItem
Private bDiscardEvents As Boolean
Private Sub Application_Startup()
Set oExpl = Application.ActiveExplorer
bDiscardEvents = False
End Sub
Private Sub oExpl_SelectionChange()
On Error Resume Next
Set oItem = oExpl.Selection.Item(1)
End Sub
Private Sub oItem_Reply(ByVal Response As Object, Cancel As Boolean)
Dim responseItem As mailItem
Set responseItem = Response
' Both work fine
responseItem.BCC = "example@example.com"
responseItem.Subject = "this is reply subject"
' None of them works
responseItem.HTMLBody = "this is reply html body"
responseItem.Body = "this is reply text body"
End Sub
【问题讨论】: