VBA Disable outlook message

Russ9517

Registered User.
Local time
Today, 13:40
Joined
Sep 15, 2006
Messages
30
I'm using this code to send an email. How do i disable the outlook message

A program is trying to automatucally send e-mail on you behalf. Do you want to allow it.

Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'On Error Resume Next
With OutMail
.To = "russell.flynn@uk.ngrid.com"
.CC = ""
.BCC = ""
.Subject = "Test"
.Body = "This is a test"
.Send 'or use .Display
.ReadReceiptRequested = True

End With
 
I believe that is set in the Microsoft Exchange options and you have to be an Exchange administrator to make those changes, since that message is there to protect from Worms and Viruses being able to send out emails without someone being able to know or stop them.
 
re:

Hi,
this is part of a security update which is supposed to prevent the automation of random emails.
There are currently only two ways around this if you want to stick with outlook. Either install this add-in...or use Outlook Redemption with automation code.
You can read more about redemption here and find some sample code implementating the redemption .dll here.
Keep in mind that the distribution of the redemption dll in a production environment requires a license fee.
HTH
Good luck
 

Users who are viewing this thread

Back
Top Bottom