Stop Email Message Alert

srcera

Board Regular
Joined
May 22, 2006
Messages
95
I have a program that monitors another program to see if it is running. When it the second program is turned off I have the first to send out an email message. However, when it does so, Outlook says "This program is trying to send a message on your behalf, this could be a virus, do you wish to allow the message to be sent?" and then pauses waiting for the operator to say yes. I need to cancel this alert and automatically send the message without asking. Some portions of the code are printed below.

Sub MailAlert()

'You must add a reference to the Microsoft outlook Library
Dim OutApp As Outlook.Application, RSviewApp As Object
Dim OutMail As Outlook.MailItem
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

' more code here

Set OutMail = Nothing
Set OutApp = Nothing


End Sub
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

srcera

Board Regular
Joined
May 22, 2006
Messages
95
The code needs to work on several computers and I do not have administrator access to any of them to install a separate application, can anyone suggest another alternative such as vba code or an add-in?

Thank you
 

Forum statistics

Threads
1,143,677
Messages
5,720,254
Members
422,273
Latest member
linds75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top