小编Pix*_*izz的帖子

Outlook 2007中的ItemSend事件中的BCC不再有效

我插入代码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)

email vba bcc outlook-vba

5
推荐指数
1
解决办法
3552
查看次数

标签 统计

bcc ×1

email ×1

outlook-vba ×1

vba ×1