Confirmation message before sending e-mail

  • Thread starter Thread starter js150570
  • Start date Start date
J

js150570

Using exchange server 2000 / Outlook 2000 clients.

Is there a simple script that can generate a prompt such as "Please
confirm you wish to send this message Y/N" when a user first attempts
to send a message?
 
Here is some code that should do what you are asking about:

Sub ConfirmSend()

Dim myolApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim SendingItem As Outlook.MailItem
Dim Msg, Style, Title, Response

Set myolApp = CreateObject("Outlook.Application")
Set myNamespace = myolApp.GetNamespace("MAPI")
Set SendingItem = Outlook.ActiveInspector.CurrentItem

Msg = "Are you sure you want to send this message ?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "Send Confirmation"

Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
SendingItem.Send
Else

End If

End Sub
 
Back
Top