Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If Item.To = "xxx@xxx.com" Then
MsgBox "Warning"
End If
End Sub
Thanks for this, it works exactly how i described, however, the email still sends when ok is pressed. Is there a way of including two options on the message box, 'send' and 'dont send'?Looks like this would go in a class module:
However, I am not having much success, possibly due to company security
VBA Code:Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) If Item.To = "xxx@xxx.com" Then MsgBox "Warning" End If End Sub
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim prompt As String
If Item.To = "xxx@xxx.com" Then
prompt = "Are you sure you want to send " & Item.Subject & "?"
If MsgBox(prompt, vbYesNo + vbQuestion, "Sample") = vbNo Then
Cancel = True
End If
End If
End Sub
Amazing, thanks for your help!Untested, something like:
VBA Code:Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim prompt As String If Item.To = "xxx@xxx.com" Then prompt = "Are you sure you want to send " & Item.Subject & "?" If MsgBox(prompt, vbYesNo + vbQuestion, "Sample") = vbNo Then Cancel = True End If End If End Sub