use and if statement on the Item's Subject field
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If Item.Subject = "exact match" Then
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. " & _
"Do you want still to send the message?"
res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
"Could Not Resolve Bcc Recipient")
If res = vbNo Then
Cancel = True
End If
End If
Item.Save
Set objRecip = Nothing
End If
or use if you want a contains a word in the subject
If InStr(Item.Subject, "BCCSubject") = 0 Then
End If
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…