Microsoft Excel

Ron de Bruin
Excel Automation

Microsoft MVP Program

Disable the mail security dialog to Send/not Send the mail

When you use the code examples from my mail page it is possible you get this security warning

Outlook Express and Windows Mail

If you use Outlook Express or Windows Mail as your default mail program you can turn off
this warning when you use the SendMail examples on my site.

1: Start Outlook Express or Windows Mail, and then on the Tools menu, click Options.
2: Click the Security tab, and then click to remove the check mark from the
    "Warn me when other applications try to send mail as me" check box.
3: Click OK to close the Options dialog box.


Outlook object model examples

If you use Outlook 2007 or up you not see this warning with a correct installed system with a virusscanner that Microsoft thinks is OK. Read the info on the following page :

But if you use Outlook 2000-2003 you must use a third party program to avoid the warning.

Express ClickYes

Outlook Redemption

Or try to use this SendKeys example if you use one of the Outlook object model examples
from my mail page. Instead of .Send in the code examples you can use this three lines.

Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"

Note: SendKeys is not always reliable and this will not work on every computer.
The S is from Send, if you not use a English version you must change this letter.
This tip is only working for the Outlook object model examples on my site.


Mail with CDO

Another option is to check out this page and see if CDO is working on your machine. There are no security warnings when you use CDO to send mail.

Sending mail from Excel with CDO