ItemSend Event Example

The following example shows how to cancel the ItemSend event in response to user input.

Private Sub myOlApp_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Prompt$ = "Are you sure you want to send " & Item.Subject & "?"
    If MsgBox(Prompt$, vbYesNo + vbQuestion, "Sample") = vbNo Then
        Cancel = True
    End If
End Sub