Monday, March 4, 2013

Microsoft Outlook 'Are you sure?' prompt before sending Email

Often, I have been annoyed when Microsoft Outlook doesn't ask for confirmation before sending an email. Although I haven't faced any unwanted 'oops!-I-sent-the-mail' moments yet, the day is not far (for some of us, the day has already gone by ;) )

For this reason, I did a little search to see how I can add this functionality, and found this incredibly simple way:

1. Open outlook and press ALT+F11.
2. This will open a Microsoft Visual Basic for Applications window. On the left pane, expand the 'Project1' group, and go to 'Microsoft Outlook Objects' > 'ThisOutlookSession' (Double Click).

3. Add the following piece of code in the editor window that shows up:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
        If MsgBox("Are you sure you want to send the email?", vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Send Email?") = vbNo Then
                Cancel = True
        End If
End Sub

4. Save the file (CTRL+S) and close.

Try sending a test mail to yourself. If you followed the steps well, the message box should show up the moment you click on 'send'!

Cool, isn't it?

Ref: Original post by Steve here: http://stevesgeekspeak.com/2010/01/howto-are-you-sure-prompt-in-outlook/
Note: I am not a VB expert, if you have questions related to the code. Have just shared this as a cool trick.

7 comments:

Unknown said...

Hey there, this really works. But what happen is after the next day, the script stop working and I couldn't figure out why.

Can you please help???

Unknown said...

Hi there, this really works!

But after closing Outlook and re-launching back, the whole script stop working and I don't know why. Tried restarting a few times and tried checking the script and nothing was changed.

Any idea?

Unknown said...

Hey mate, thanks for your script. It works initially when I saved the script but after I reboot my computer, it doesn't work any more. Regardless of whatever I put, it doesn't work and there are no windows or prompt.

Any reason why?

damianpl said...

Thank you!

Dhaval said...

@Marcus, yeah noticed that. Apparently, the way to get around that is to lower the security settings in your outlook, so unsigned macros (such as this) can run..
Also, do check out the reference link in my footnote, where Steve shares a few more debugging tips you could try out.

dingoshark said...

Or just use an add-in that makes you confirm external recipients and files. There are a few like SafeSend Software or Sperry Software that can do that.

dingoshark said...

Or you can use an add-in that makes you confirm external recipients and files. Here are a few that can do it: www.safesendsoftware.com and www.sperrysoftware.com.