Microsoft KB Archive/262997

= ACC97: &quot;A Program Is Trying to Send...&quot; Message with SendObject Macro or Method =

Article ID: 262997

Article Last Modified on 1/27/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q262997



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



SYMPTOMS
When you run the SendObject macro action or the SendObject Visual Basic for Applications method with the EditMessage argument 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;.

The Yes button in the dialog box is disabled for a few seconds, and then you are able to click Yes. If you click Yes, the e-mail message is sent. If you click No, the message is not sent, and you then see one of the following error messages.

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

Resolve that problem, and then send the message again.

With the SendObject VBA Method
Run-time error '2293':

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



CAUSE
You have applied the Outlook E-mail Security Update.



MORE INFORMATION
For additional information about this security update, click the article number below to view the article in the Microsoft Knowledge Base:

262617 OL98: Information About the Outlook E-mail Security Update

Steps to Reproduce the Behavior
 Install Microsoft Access 97 and Microsoft Outlook 98. Apply the Outlook 98 E-mail Security Update. Open the sample database Northwind.mdb. In the Database window, click Macros, and then click New.  Create a new macro that has the following actions:   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. Note that you receive the first message, &quot;A program is trying to automatically...&quot;, that is described in the &quot;Symptoms&quot; section of this article. If you click Yes, your e-mail message is sent. If you click No, you see the 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, and then on the Insert menu, click Module.</li>  In the new module, type 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 Debug window, type the following line, and then press ENTER: VBATestSend Note that you receive the message, &quot;A program is trying to automatically...&quot;, that is described in the &quot;Symptoms&quot; section of this article. 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">