Outlook Email Security Message

  • Thread starter Thread starter MikeP125
  • Start date Start date
M

MikeP125

Hi,
I am trying to have my Access 2003 database send an email through Outlook
2003 without have ing Outlook opened. I have the code that works, except I
get this security warning that says:
"A program is trying to automatically send e-mail on your behalf. Do you
want to allow this?"
Then I need to manually click "Yes". How can I avoid this warning box and
have the email automatically be sent out? Below is my code:

Public Function Reminder1Email()

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem

' Create the Outlook session.
Set objOutlook = New Outlook.Application

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
.subject = DLookup("[Subject]", "qrySendRemider1")
.To = DLookup("[EmailReminderAddress]", "qrySendRemider1")
.body = DLookup("[Message]", "qrySendRemider1") & vbCrLf & "This is an
automated message. Please do not respond"
.Importance = olImportanceHigh
.Send
End With

End Function

Thanks for your help.
 
I have issues loading 3rd party software at work. Is there a way to bypass
this security box without using 3rd party software?

Douglas J. Steele said:
Take a look at http://www.dimastr.com/redemption/

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


MikeP125 said:
Hi,
I am trying to have my Access 2003 database send an email through Outlook
2003 without have ing Outlook opened. I have the code that works, except
I
get this security warning that says:
"A program is trying to automatically send e-mail on your behalf. Do you
want to allow this?"
Then I need to manually click "Yes". How can I avoid this warning box and
have the email automatically be sent out? Below is my code:

Public Function Reminder1Email()

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem

' Create the Outlook session.
Set objOutlook = New Outlook.Application

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
.subject = DLookup("[Subject]", "qrySendRemider1")
.To = DLookup("[EmailReminderAddress]", "qrySendRemider1")
.body = DLookup("[Message]", "qrySendRemider1") & vbCrLf & "This is an
automated message. Please do not respond"
.Importance = olImportanceHigh
.Send
End With

End Function

Thanks for your help.
 
No. You'll have to look into a different way of e-mailing, such as CDO (see
what Tony Toews has at http://www.granite.ab.ca/access/email/cdonts.htm for
more details)

BTW, I don't believe the problem occurs in Office 2007.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


MikeP125 said:
I have issues loading 3rd party software at work. Is there a way to bypass
this security box without using 3rd party software?

Douglas J. Steele said:
Take a look at http://www.dimastr.com/redemption/

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


MikeP125 said:
Hi,
I am trying to have my Access 2003 database send an email through
Outlook
2003 without have ing Outlook opened. I have the code that works,
except
I
get this security warning that says:
"A program is trying to automatically send e-mail on your behalf. Do
you
want to allow this?"
Then I need to manually click "Yes". How can I avoid this warning box
and
have the email automatically be sent out? Below is my code:

Public Function Reminder1Email()

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem

' Create the Outlook session.
Set objOutlook = New Outlook.Application

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
.subject = DLookup("[Subject]", "qrySendRemider1")
.To = DLookup("[EmailReminderAddress]", "qrySendRemider1")
.body = DLookup("[Message]", "qrySendRemider1") & vbCrLf & "This is
an
automated message. Please do not respond"
.Importance = olImportanceHigh
.Send
End With

End Function

Thanks for your help.
 
Doug - I'm doing this in 2007 with the same result. However, CDO is disabled
in Exchange 2007 as well. I have to send this out as MAPI, but since this is
a shared database across the company, I cannot set everyone's macro security
to Low. Do you have any other suggestions?

Darryl

Douglas J. Steele said:
No. You'll have to look into a different way of e-mailing, such as CDO (see
what Tony Toews has at http://www.granite.ab.ca/access/email/cdonts.htm for
more details)

BTW, I don't believe the problem occurs in Office 2007.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


MikeP125 said:
I have issues loading 3rd party software at work. Is there a way to bypass
this security box without using 3rd party software?

Douglas J. Steele said:
Take a look at http://www.dimastr.com/redemption/

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Hi,
I am trying to have my Access 2003 database send an email through
Outlook
2003 without have ing Outlook opened. I have the code that works,
except
I
get this security warning that says:
"A program is trying to automatically send e-mail on your behalf. Do
you
want to allow this?"
Then I need to manually click "Yes". How can I avoid this warning box
and
have the email automatically be sent out? Below is my code:

Public Function Reminder1Email()

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem

' Create the Outlook session.
Set objOutlook = New Outlook.Application

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
.subject = DLookup("[Subject]", "qrySendRemider1")
.To = DLookup("[EmailReminderAddress]", "qrySendRemider1")
.body = DLookup("[Message]", "qrySendRemider1") & vbCrLf & "This is
an
automated message. Please do not respond"
.Importance = olImportanceHigh
.Send
End With

End Function

Thanks for your help.
 
Go with Redemption, the catch though is that it has to be installed on any
PC that needs to use the library.

http://www.dimastr.com/redemption/



dkschoonover said:
Doug - I'm doing this in 2007 with the same result. However, CDO is
disabled
in Exchange 2007 as well. I have to send this out as MAPI, but since this
is
a shared database across the company, I cannot set everyone's macro
security
to Low. Do you have any other suggestions?

Darryl

Douglas J. Steele said:
No. You'll have to look into a different way of e-mailing, such as CDO
(see
what Tony Toews has at http://www.granite.ab.ca/access/email/cdonts.htm
for
more details)

BTW, I don't believe the problem occurs in Office 2007.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


MikeP125 said:
I have issues loading 3rd party software at work. Is there a way to
bypass
this security box without using 3rd party software?

:

Take a look at http://www.dimastr.com/redemption/

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Hi,
I am trying to have my Access 2003 database send an email through
Outlook
2003 without have ing Outlook opened. I have the code that works,
except
I
get this security warning that says:
"A program is trying to automatically send e-mail on your behalf. Do
you
want to allow this?"
Then I need to manually click "Yes". How can I avoid this warning
box
and
have the email automatically be sent out? Below is my code:

Public Function Reminder1Email()

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem

' Create the Outlook session.
Set objOutlook = New Outlook.Application

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
.subject = DLookup("[Subject]", "qrySendRemider1")
.To = DLookup("[EmailReminderAddress]", "qrySendRemider1")
.body = DLookup("[Message]", "qrySendRemider1") & vbCrLf & "This
is
an
automated message. Please do not respond"
.Importance = olImportanceHigh
.Send
End With

End Function

Thanks for your help.
 
Back
Top