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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Outlook alerts when automatically sending email from Access 2

Status
Not open for further replies.
Jan 22, 2001
124
0
0
US
Hi

I'm attempting to automatically send an Outlook email using VBA. I always get an alert from Outlook stating:

"A program is trying to automatically send e-mail on your behalf.
Do you want to allow this?

If this is unexpected, it may be a virus and you should choose "No".

There is a "Yes" and "No" button.

This isn't automation. Is there a way to suppress this message? Any ideas would be greatly appreciated. Thanks in advance for any help.

-Rob

 
Application.DisplayAlerts = False

add this to the sectio where you create the outlook instance.

hth Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Thanks for the response Bastien, but I get an error message:

Run-time error '438':

Object doesn't support this property or method.
 
That's because the Outlook.MailItem.Application doesn't have a Display Alerts property.

I have scanned the Outlook Object library ... cant find anything to disable warnings.

Sounds to me like your Virus software or some other third party program is making that warning popup. It's not Outlook and it's not Accsess.

Go into that third party program and disable the warnings in there. Your DB should run fine on a computer that doesn't have this software isntalled. Don't worry, it's not you ;-).

-Josh
------------------
-JPeters
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------
 
Josh, I can't really do that. This db is run on a server with many users. I would have to disable this on every machine.
 
I'm really sorry. But unless VBA lets you access this third party software through some reference. Then their object model lets you disable warnings in code, then re-enable them after sending... There's not much you can do. [shadesad] (sorry, I'm on a face graphics benge this week).

Honestly, they are just going to have to either disable it on their machine, or they'll have to deal with the warning each time they use the DB. It's a shame, I mean a real shame... Making your fellow employees push an 'ok' button. ;-) Atleast we got it figured out for ya. Goodluck with it all.

-Josh ------------------
-JPeters
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------
 
Hi!

This is an Outlook security message. Your IT personnel should be able to remove it but are unlikely to be receptive to that option. To my knowledge, Access cannot work around it so your options are to have IT remove the security from the machines in question or train the employees who will be using your mail function.

Sorry Jeff Bridgham
bridgham@purdue.edu
 
Hey Jebry

I 've done this for a number of apps that I built through Access, and have never seen this...'course that would depend on the IT guys here setting it up correctly so who knows


:)

Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
I've had this happen once and I can't remember where to find this but look through your Security Options and Preferences in Outlook for a check box that says something like - "Warn Me When Other Applications Try To Send Mail As Me.". Good Luck!
 
FYI - as stated before it is part of Outlook. It is part of the Outlook Security Template. It was created in response to viruses like Melissa that exploited VBA's ability to send mail items. There is no "work around" for it other than to disable the warning message in the security template which would affect everyone who uses the security template (normally a large group or entire corporation). The only ones who can do this are your IT staff. There are no options within the Outlook client to remove the warning.

Sorry this doesn't solve your problem, but hopefully prevents you from wasting time trying to find a solution.
 
Well I do agree. I have hte same problem. I recently upgraded a "critical update" from windows. I am on a corporate network and other machines that run my access app. do not have this problem. It's localized to my laptop. So there has to be some setting someplace locally.
 
If your laptop is the only one reacting this way, then search your harddrive for the .oft file or the .adm file. This is the security template and system policy file, respectively. This is sometimes done for roaming users who may go from network to network. If you have the Resource kit on your laptop, you can change the setting. However, if your IT department set up the laptop, they propably have an admin password. This will be required to make any changes to the .adm or .oft file.
 
Shawn - If your laptop is the only computer reacting this way, then search your harddrive for the .oft file or the .adm file. This is the security template and system policy file, respectively. This is sometimes done for roaming users who may go from network to network. If you have the Resource kit on your laptop, you can change the setting. However, if your IT department set up the laptop, they propably have an admin password. This will be required to make any changes to the .adm or .oft file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top