Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Warning 2

Status
Not open for further replies.

scottian

Programmer
Jul 3, 2003
955
GB
Im using Access to automatically send emails. When the user clicks the send button a security message pops up warning the user that "another application is trying to automatically send email on your behalf, do you want to allow this?" if the user chooses 'Yes' everything is OK, but if the user chooses 'No' Access throws up a rather alarming error message. Is there a way to stop this or create my own softer error message?

"My God! It's full of stars...
 
Do a google search for outlook object model guard

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
or, in you Errorhandler, trap the message?

On error go to xxx

Dim ol As Outlook.MailItem
....


xx:
End Sub
xxx:
If err = 2501 Then
Resume next
Else
MsgBox Err & vbcrlf & Error$
Resume xx
End If
 
I don't believe you can trap that error and still send the email. Zion7 - has that worked for you? If so, what version of access/outlook?

If you follow the trail PHV's got you on, you will eventually find something called Outlook Redemption that I have heard good things about.

Another approach is to use CDO & SMTP (if SMTP is enabled on your mail server). I like this because you don't have to buy anything, but it does have its' limitations (because of concern about SMTP being used for spamming).

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Alex, you may be right.
though, It does work on simply cancelling the send,(not pressing send). outlook XP
I didn't follow the link, but by your post, i think i get the idea. yes there are 3rd party apps, that can overide these messages (each computer must have it?).

CDO is nice but, i believe you must know the POP, SMTP, etc. of each computer? (at least I did)
 
Outlook Redemption works well and is pretty easy to code, and it's free. Or you could take a look at ClickYes, an app that automatically answers "yes" to the Outlook security warning.

HTH,

Ken S.
 
Sorry guys, using a 3rd party app is not an option.

"My God! It's full of stars...
 
Redemption, is actually a library. I had to DLoad it, to get
it to work. I don't even know where it is residing(it's not
in my list of add-ins?)...I think from the web?
Is CDO an option?
 
When the user clicks the send button a security message pops up
Which code actually sends the email ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
this is what i use. its triggered by a button 'OnClick' event :-

Dim strWAEmail, strWABody, strWASubject As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem

Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)

strWAEmail = “Recipient email address goes here”
strWASubject = "Subject of Email”
strWABody = "Body of email goes here”

With objEmail
.To = strWAEmail
.SentOnBehalfOfName = "Team.EmailAddress@work.com"
.Subject = strWASubject
.Body = strWABody
.Importance = olImportanceHigh
.Send
End With

Set objEmail = Nothing



"My God! It's full of stars...
 
All I need to know for SMTP sending is the server's IP address, and what port SMTP is enabled on (usually its' the default, 25 I think?).

Scottian - have you looked into whether this is a possibility? You don't really have a ton of other options if you can't use a third party add-in.

Good Luck,

Alex

Ignorance of certain subjects is a great part of wisdom
 
I heard a rumor that these warnings could be suppressed in Outlook 2007. Can anyone confirm?

Scottian, when you say you can't use 3rd party apps - what's the hitch? Installation prohibited? No money available? FWIW, Outlook Redemption isn't strictly an application, it's a library that makes Extended MAPI available. If you wanted, you could code this functionality yourself (although I understand it is not trivial to do so).

Ken S.
 
Replace this:
.Send
with this:
.Display

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,
You are a demon, thank you for that. It actually works better than what i had. Wear your star with pride.

Eupher,
Im just a lowly worker in a big company and i dont have the 'status' to install apps or alter the system setup (i dont work in IT).

Thanks for everyones help.

"My God! It's full of stars...
 
Scottian:

Do you know a way to programatically disable the Outlook spelling features on the user's system before sending the message?

I use a similar process to yours (except I use the sendkeys to send the message):

Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)

With MailOutLook
.To = strRecipients
.Subject = "Schedule Request"
.Body = "New Request from " & txtRequestor
.Display
End With
SendKeys "%{s}", True

Set appOutLook = Nothing
Set MailOutLook = Nothing

The problem I have encountered is when users have the 'Always check spelling before sending' choice set to true on the spelling options in Outlook.

I am capturing the requestor's name as Environ("UserName") which is in LastFirst name format; that 'word' is not in the user's dictionary which is causing quite a problem with some users.

Thanks.

Larry De Laruelle

 
There is also a ClickYes tool; but I simplified the issue and used a DOS based SMTP Email tool called BLAT. Worked for my simple needs to send a email message text.

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Hi,

Can I confirm that the Outlook security messages were completely removed by simply replacing '.Send' with '.Display'?

I know that there is an MS supported registry hack for this, but it simply removes the security put in place by MS to stop Outlook being used by malicious virus' etc.

Sorry - can't point you to it, but I have used it in the past and it does the job.

Regards,

Darrylle


Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Hi again,

OK, yes the security messages don't appear, because the email is displayed for the user to send. I was however hoping for emails to be sent without user interaction.

I think that the registry fix is the only way to do this.

Regards,

Darrylle





Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Darrylle:

The "SendKeys "%{s}", True" line sends the e-mail automatically. The email message will flash on the user's screen as it is displayed and then sent.

The problem I have encountered is that, if the user has the check before sending option set in Outlook, the SendKeys will trigger the spell check on any words not in the user's dictionary and then hang waiting for the users response. In my case, capturing and using the logon name (in LastFirst order) will cause that trigger.

I'm hoping to find a way to programmatically disable (and then reenable) all spell check functions in the iteration of Outlook that is opened for this process.

Larry De Laruelle

 
Larry,

Thanks for pointer.

Regards,

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top