且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

自动删除电子邮件正文中的警告

更新时间:2022-12-03 09:36:22

在ThisOutlookSession模块中.

In the ThisOutlookSession module.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

     Item.HTMLBody = Replace(Item.HTMLBody, "Caution - External Email", "")

End Sub

使用应用程序"时不需要Dim语句.这比Microsoft文档中描述的方法更简单.如果需要,它将在模块顶部的Sub之外.

The Dim statement is not needed when using "Application". This is simpler than the way described in Microsoft documentation. If you needed it, it would be outside of the Sub at the top of the module.