Go Premium for a chance to win a PS4. Enter to Win

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8297
  • Last Modified:

How do I disable Outlook's warning messages?

How can I use VBA to disable the "security" warning messages I get when sending email in Outlook?  The message I'm talking about it is the "A program is trying to access data from Outlook ..." etc.

Any ideas that are not the COM add-in "shims"?
2 Solutions
There is this...

And this...

Not 100% sure which you are referring... If you're referring to outlook complaining about certain types of files that are being attached, the second link.

Can you tell me exactly the error message and exactly when it appears? Chances are you wont need VBA...
maatthiasAuthor Commented:
every time my VBA code executes a method in the MailItem object I get a warning message.  here are all of them

when I do MailItem.SaveAs I get "A program is trying to access data from Outlook that may include address book information.  Do you want to allow this?   If this is unexpected, it may be a virus and you should choose "No."   Allow access for "1 minute/2 minutes/5 minutes/10 minutes."

When I do Mailitem.Recipients.Add I get "A program is trying to access e-mail addresses you have stored in Outlook.  Do you want to allow this?  If this is unexpected, it may be a virus and you should choose "No."   Allow access for "1 minute/2 minutes/5 minutes/10 minutes."
The short answer is that the only way to configure the enhanced security features of Outlook is to be in an Exchange environment.  (Covered in Jim's link on Slipstick)  If you are developing software that is not going to be run in an Exchange environment is to recode the solution using one of the following to avoid the prompts.

1) Extended MAPI and C++ or Delphi
2) Redemption

There is a program called Click Yes that would automate the presseing of the yes/no option to allow access, but it really isn't great when trying to provide professional COM Addins for Outlook 2000/2002.  Outside of that, the security model is slated to change in Outlook 2003. (COM Addins will get a trusted Application object that doesn't trigger the object model guard.)

use this works for me

"Redemption uses Extended MAPI (which is not affected by the Security Patch since it is not accessible to the scripting languages)"

maatthiasAuthor Commented:
Redemption was the solution.  Worked great.  Thanks all.

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