Microsoft KB Archive/263084

= How to work with the Outlook E-mail Security Update in an Access database =

Article ID: 263084

Article Last Modified on 8/23/2007

-

APPLIES TO


 * Microsoft Office Access 2007
 * Microsoft Office Access 2003
 * Microsoft Access 2002 Standard Edition
 * Microsoft Access 2000 Standard Edition
 * Microsoft Office Outlook 2007
 * Microsoft Office Outlook 2003
 * Microsoft Outlook 2002 Standard Edition
 * Microsoft Outlook 2000 Standard Edition

-



This article was previously published under Q263084



Novice: Requires knowledge of the user interface on single-user computers.

This article applies to either a Microsoft Access database (.mdb) file or to a Microsoft Access database (.accdb) file, and to a Microsoft Access project (.adp) file.



SYMPTOMS
When you use the SendObject macro action or the SendObject Microsoft Visual Basic for Applications (VBA) method, and the EditMessage argument is set to No, you may receive the following message:

A program is trying to automatically send e-mail on your behalf.

Do you want to allow this?

If this is unexpected, it may be a virus and you should choose &quot;No&quot;.

Note In Outlook 2007, you may receive the following message:

A program is trying to send an e-mail message on your behalf. If this is unexpected, click Deny and verify your antivirus software is up-to-date. For more information about e-mail safety and how you might be able to avoid getting this warning, click Help.

The Yes button in the dialog box is disabled for several seconds, and then you can click Yes. If you click Yes, the e-mail message is sent. If you click No, the message is not sent, and then you may receive one of the following error messages.

Note In Outlook 2007, you click Allow instead of Yes, and you click Deny instead of No.

Error messages that are received with the SendObject macro action
Error message 1

Microsoft Access can't send a message for the reason stated in the preceding alert.

Resolve that problem, and then send the message again.

Error message 2

Microsoft Office Access can't send this e-mail message. Before attempting to send an e-mail message from Microsoft Office Access, resolve the problem identified in the previous message, or configure your computer to send and receive e-mail messages.

Error message that is received with the SendObject VBA method
Error message for Access 2003:

Run-time error '2293':

Microsoft Access can't send a message for the reason stated in the preceding alert.

Error message for Access 2007:

Run-time error '2293':

Microsoft Office Access can't send this e-mail message.



CAUSE
When you apply the Microsoft Outlook E-mail Security Update, the Outlook E-mail Security Update provides additional levels of protection against malicious e-mail messages. The Outlook E-mail Security Update changes the way that attachments are handled by Outlook and the way that Outlook can be controlled programmatically.

Note The Outlook E-mail Security Update is included with Microsoft Outlook 2002, Microsoft Office Outlook 2003, and Microsoft Office Outlook 2007.



WORKAROUND
To work around this problem, you can customize the behavior of the Outlook E-mail Security Update. You can customize the behavior only if you are running Outlook in a Microsoft Exchange Server environment, and your e-mail messages are delivered to a server-based mailbox.

Note If your mail is delivered to a Personal Folders (.pst) file, you cannot configure the settings for the update.

For more information about this security update, click the following article number to view the article in the Microsoft Knowledge Base:

262631 Information about the Outlook E-mail Security Update

You cannot bypass or avoid this security feature if you are using code with the Outlook Object Model, Collaboration Data Objects 1.21, and Simple MAPI. To avoid the security prompts, you can use the following methods which do not utilize the components that are previously mentioned:  Administer settings from the server by using the steps in the following Microsoft Knowledge Base article:

290499 Administrator information about e-mail security features

290500 Description of the developer-related e-mail security features in Outlook 2002

 If you do not have control over client environments, then you can use CDO for Windows (CDOSYS) that is installed with Windows 2000 and Windows XP.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

286431 How to send HTML formatted mail using CDO for Windows 2000 and a remote SMTP service

286430 How to send HTML formatted mail using CDO for Windows 2000 and the Local Pickup directory

 You can use Extended MAPI to send mail and access data. However, the language and the API are more complex than using Visual Basic with the Outlook Object Model. Create a COM add-in for Outlook

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

316983 A sample COM add-in that uses the Visual Basic 6.0 add-in template

240768 How to programmatically reference a COM add-in





Steps to reproduce the problem
<ol> Apply the Outlook E-mail Security Update on a computer that is running Microsoft Access 2000 and Outlook 2000.</li> Open the Northwind.mdb sample database.</li> In the Database window, click Macros, and then click New.</li>  Create a new macro that has the following actions: <pre class="fixed_text">  Macro name   Action ---  TestSend     SendObject

TestSend action arguments ---  SendObject Object Type: Report Object Name: Catalog Output Format: Rich Text Format To: Edit Message: No </li> On the File menu, click Save.</li> On the Run menu, click Run.

Notice that you receive the following message that is mentioned in the &quot;Symptoms&quot; section:

A program is trying to automatically send e-mail on your behalf.

Do you want to allow this?

If this is unexpected, it may be a virus and you should choose &quot;No&quot;.

If you click Yes, your e-mail message is sent. If you click No, you may receive the following error message:

Microsoft Access can't send a message for the reason stated in the preceding alert.

Resolve that problem, and then send the message again.

</li> Close the macro.</li> On the Insert menu, click Module.</li>  In the new module, add the following code: Sub VBATestSend DoCmd.SendObject acReport, &quot;Catalog&quot;, &quot;RichTextFormat(*.rtf)&quot;, _ &quot; &quot;, &quot;&quot;, &quot;&quot;, &quot;This is a test.&quot;, &quot;&quot;, False, &quot;&quot; End Sub </li>  In the Immediate window, add the following code, and then press ENTER: VBATestSend Notice that you receive the following message that is mentioned in the &quot;Symptoms&quot; section:

A program is trying to automatically send e-mail on your behalf.

Do you want to allow this?

If this is unexpected, it may be a virus and you should choose &quot;No&quot;.

If you click Yes, your e-mail message is sent. If you click No, you receive the following error message:

Run-time error '2293':

Microsoft Access can't send a message for the reason stated in the preceding alert.

</li></ol>

<div class="references_section">