我插入代码ItemSend并保存了ThisOutlookSession模块.它工作一次,不再有效.它保存为VBAproject.OTM,并在重新启动Outlook后打开模块时仍然存在.
Private Sub Application_ItemSend(ByVal Item As Object, _
Cancel As Boolean)
Dim objRecip As Recipient
Dim strMsg As String
Dim res As Integer
Dim strBcc As String
On Error Resume Next
''# #### USER OPTIONS ####
''# address for Bcc -- must be SMTP address or resolvable
''# to a name in the address book
strBcc = "someone@somewhere.dom"
Set objRecip = Item.Recipients.Add(strBcc)
objRecip.Type = olBCC
If Not objRecip.Resolve Then
strMsg = "Could not resolve the Bcc recipient. " …Run Code Online (Sandbox Code Playgroud)