Outlook 2003 security pop up on automated emails

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've been trying to find out how to get around the Outlook 2003 warning of
programs accessing emails when sending out automated emails from Access 2003.

The current simplified code we've been using is:

Sub SendMessage()
Dim msg As Object
Dim outl As Object
Set outl = GetObject("", "Outlook.Application")
Set msg = outl.CreateItem(olMailItem)
msg.Subject = "Test email"
msg.to = "email address"
msg.Body = "This is a test."
msg.Send
End Sub

I tried entering Set outl = Application But got run time error 438.

I'm not particularly technical, so if anyone knows what I'm doing wrong,
please could you explain what I need to alter (simply!)


Thank you
 
Thank you, but I have already seen that. I don't really understand that
majority of what it's talking about and I can't download any add on's or
programs without waiting a year or two for them to be authorised. I've seen
a number of people on here alter thier coding and made it work, but no
combination of solutions that I've tried have worked... Does anyone have any
suggestions for practical things that I can try?

Thanks
 
There is really nothing you can do
1. You cannot rewrite your code to use Extended MAPI since you are using
Access VBA (you'd need C++ or Delphi).
2. Your code cannot be trusted by Outlook since your code runs in Access
(which is an external app) rather than in an Outlook COM addin.
3. You cannot use any third party solutions.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top