[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1034
  • Last Modified:

Send email from Access - Outlook security pop-up comes up BEHIND other windows, and sometimes can't be "found" to click on it!

In an Access application, users can click a button to send an email to the person whose record they are currently viewing, sometimes with an automatically composed message. In some places, Access collects a group of people to generate emails for.  When Access tries to set up the email in Outlook, the infamous security warning pops up - where you have to click to allow access to Outlook for 1 minute, 5 minutes, etc.  The users are OK with this. However, on some users machines recently, the security warning seems to pop up BEHIND other windows, and at times the users can't find it at all! The result is that they can't  click on it, the emails don't get generated, and my database is "broken".

Is there some way to make the security warning pop up on TOP of everything? Isn't that what it is supposed to do?
0
MicheleRobinson
Asked:
MicheleRobinson
6 Solutions
 
smackay4069Commented:
Is it possible that the windows in access are setup to be pop up or modal, which would mean they always are on top or have the focus. Also why not get a utility called click yes which clicks the yes automatically after the specified time. This means they wont need to see the outlook window

http://www.contextmagic.com/express-clickyes/
0
 
Eric ShermanAccountant/DeveloperCommented:
Actually, the way I handled this situation was to use the Redemption Outlook DLL which will bypass this security prompt.

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

Once you install the Redemption DLL you will simply pass the Outlook Message to Redemption to bypass the security promt.  This works like a charm.  I have a client that sends emails daily to hundreds of customers using this method.

See sample code below.

Function SendMessage(AttachmentPath, strSubject, strBody)
   Dim ObjOutlook As Outlook.Application
   Dim objOutlookMSG As Outlook.MailItem
   Dim objOutlookRecip As Outlook.Recipient
   Dim objOutlookAttach As Outlook.Attachment
   Dim objSafeMail As Object
 
   
' Create the Outlook session.
Set ObjOutlook = CreateObject("Outlook.Application")

' Create the message.
Set objOutlookMSG = ObjOutlook.CreateItem(olMailItem)

With objOutlookMSG

      ' Set the Subject, Body, and Importance of the message.
   
      .SUBJECT = strSubject
      .BODY = strBody & vbCrLf & vbCrLf
      .Importance = olImportanceHigh  'High importance

      ' Add attachments to the message.
     
      If Not IsMissing(AttachmentPath) Then
        Set objOutlookAttach = .Attachments.Add(AttachmentPath)
      End If

End With
     
 'Passes the Outlook Message to Redemption to Bypass security prompts.
 objOutlookMSG.Save
 Set objSafeMail = CreateObject("Redemption.SafeMailItem")
 objSafeMail.Item = objOutlookMSG


'Recipients

   objSafeMail.Recipients.Add (strRecipAcct)

'Send
   
   objSafeMail.Send
   
End Function

ET
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
If you're going to distribute your application, remember that you'll need to purchase a license for Redemption ($199, I believe) ... not a bad price, but you can get 3rd party email libraries which do the same thing and more for less cost. If you need to interact with Outlook (like manipulate the Calendar, Appointments, etc) then Redemption is the way to go ...
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
harfangCommented:
Hello MicheleRobinson

Just a thought. Can't you activate Outlook when you send the mail? That way, the message would naturally be on top, since it always on top of Outlook itself. For example, if you can retreive the caption of the current Outlook session, use AppActivate. But there are many other ways to activate an application as well.

(°v°)
0
 
Wayne Taylor (webtubbs)Commented:
Hi MicheleRobinson,

You might like to have a look at CDO which bypasses Outlook altogether :- http:/Q_21336007.html

Regards,

Wayne
0
 
MicheleRobinsonAuthor Commented:
Thanks for all the feedback! The forms in Access are neither pop-up nor modal, so that isn't it.  Also, the odd thing is that this has started to happen on some user's computers, but not for others.  Of course it seems to work just fine on mine.  I think I'll have to check out both this click yes thing and Redemption. However, I'm guessing that either one of them would have to be installed on every user's computer... And I'm not sure if the customer really wants to bypass the security.  I will check the code in the morning to see if there is any place where I don't actually activate Outlook - that could possibly be it.  I'll let you know tomorrow if it might be the case, though I'll still have to wait until Monday for the people with the problem to try out a solution, since I don't have a direct link to those particular PC's.
0
 
harfangCommented:
"... to those particular PC's", no, but you can try different working habits: Outlook open in the background, Outlook minimized to the toolbar, not opened at all, etc.

(°v°)
0
 
rockiroadsCommented:
Go for the CDO version - as webtubbs as suggested

When u use CDO, you never get prompted for the Outlook security message

this is the solution I give always when one wants to get rid of the warning, only drawback is u have to know the smtp server. So if this is used on a PC not using your smtp server, you need to ensure that the user's smtp server is saved somewhere, like a config table. Then your code reads this table

0
 
MicheleRobinsonAuthor Commented:
I wasn't able to actually get rid of the problem - I couldn't put any new programs on every user's computer, and nothing else seems to work consistently - but then the problem isn't consistent on everyone's PC either.  Go ahead and split the points - everyone tried to offer something.  Thanks!
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Tackle projects and never again get stuck behind a technical roadblock.
Join Now