Solved

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

Posted on 2006-06-10
10
1,020 Views
Last Modified: 2008-05-14
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
Comment
Question by:MicheleRobinson
10 Comments
 
LVL 1

Assisted Solution

by:smackay4069
smackay4069 earned 83 total points
ID: 16877898
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
 
LVL 19

Accepted Solution

by:
Eric Sherman earned 85 total points
ID: 16878120
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
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 83 total points
ID: 16878545
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
 
LVL 58

Assisted Solution

by:harfang
harfang earned 83 total points
ID: 16879065
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 47

Assisted Solution

by:Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs) earned 83 total points
ID: 16879558
Hi MicheleRobinson,

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

Regards,

Wayne
0
 

Author Comment

by:MicheleRobinson
ID: 16879640
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
 
LVL 58

Expert Comment

by:harfang
ID: 16880097
"... 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
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 83 total points
ID: 16881524
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
 

Author Comment

by:MicheleRobinson
ID: 17073868
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now