outlook密送给自己的VBA

来源:互联网 发布:matlab字符串数组赋值 编辑:程序博客网 时间:2024/04/30 12:51
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim oItem As MailItem
    Dim oRecipient As Recipient
    Set oItem = Item

    Set oRecipient = oItem.Recipients.Add("account@mailserver.com")
    oRecipient.Type = Outlook.olBCC
    oItem.Recipients.ResolveAll
    oItem.Save
    Set oRecipient = Nothing
    Set oItem = Nothing
End Sub

把 account@mailserver.com 改成自己的邮箱账号
0 0
原创粉丝点击