Outlook Security Warning

D

dkschoonover

I'm trying to send an auto-email from Access and get the perverbial "Allow
Access" prompt. I've looked at http://www.outlookcode.com/d/sec.htm as some
have suggested, but don't understand it (programming newbie here). Can
anyone help me wrap my head around this? (Note: I can't use CDOMail due to
security restrictions)

The Code I'm using (from another posting) is:
Sub SendMessageNew(Optional AttachmentPath)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

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

With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("[recipient]")
objOutlookRecip.Type = olTo

' Add the CC recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add("[recipient]")
objOutlookRecip.Type = olCC

' Set the Subject, Body, and Importance of the message.
.Subject = "Test"
.HTMLBody = "I'm new at this"
.Importance = olImportanceHigh 'High importance

' Add attachments to the message.
If Not IsMissing("C:\test.txt") Then
Set objOutlookAttach = .Attachments.Add("C:\test.txt")
End If

' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
If Not objOutlookRecip.Resolve Then
objOutlookMsg.Display
End If
Next
.Send

End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub
 
D

dkschoonover

Forgive me for sounding like an idiot...but this is the same as the one I
listed in my original post and am very confused.

Can anyone offer any suggestions as to how this works into my existing code?
There are so many pieces in reading this article, I don't know what to put
where.

Darryl
 
D

Dmitry Streblechenko

You need to decide first what exactly you are going to use to work around
the security patch: rewrite your code in C++ or Delphi to use Extended MAPI,
use Redemption, switch to using staright SMTP, etc.

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

dkschoonover

The only Option our IT team will let me use is what I have listed in the code
below. I cannot install additional software, I know nothing about C++, and
straight SMTP is blocked when sending outside the domain.

Thank you for your continued suggestions. (the good news is that this is
all done in a test environment right now, so end users presently don't see
all my hacking at this)

Darryl
 
D

Dmitry Streblechenko

So you are saying that you are limited to using Outlook Object Model alone
from Access VBS?
Unless you switch to Outlook 2007 and make sure all antivirus apps are up to
date, there is no way to get rid of the security prompt.

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

JP

Agreed with Dimitry here, but maybe you could try something I heard
about that might work. Write your code in Outlook VBA, and then call
it from Access. I haven't tried it but I read it can get you around
the object model guard.

Good luck!
JP
 
D

dkschoonover

How would I do that? Like I said before, I'm a newbie and rather clueless
when it comes to programming. (and if I'm understanding correctly, I would
have to implement that code for every user that would encounter this prompt
right?)

Thanks,
Darryl
 
D

dkschoonover

Yes I am.

Is it just Outlook that has to be pointing to v2007, or does Access as well?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top