0
我們有多個用戶使用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
strBcc = "<mailboxname>"
If Item.SendUsingAccount = "<mailboxname>" Then
Set objRecip = Item.Recipients.Add(strBcc)
objRecip.Type = olBCC
'Set variable objRecip (recipient) = Item.Recipients.Add (strBcc)
If Not objRecip.Resolve Then
strMsg = "Could not resolve the Bcc recipient. " & _
"Do you want to send the message?"
res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
"Could Not Resolve Bcc")
If res = vbNo Then
Cancel = True
End If
End If
End If
Set objRecip = Nothing
End Sub