Unwanted Message pop-up about program trying to access address boo

G

Guest

I have written some Visual Basic code to identify and delete junk mail that
gets by Outlook's spam filters. To do this, the procedure works with the
SenderName, Body and HTMLBody properties of the MailMessage item. The
procedure is associated with the New Mail event.

Whenever the code runs, I get an Outlook pop-up message window alerting me
that “A program is trying to access e-mail addresses you have stored in
Outlook. Do you want to allow this?†Code execution is suspended until I
respond to the pop-up. So any time my code runs when New Mail arrives, the
Message Box pops up and my code execution is suspended until I respond to the
message box giving permission to continue.

The pop-up appears when the lines of code are executed that reference the
SenderName, Body, and HTMLBody properties. The pop-up is not triggered by
accessing the Unread property. At no point in the code do I work with or
reference the ContactItem or AddressList objects

I have tried unsuccessfully to find something in Outlook that will allow the
code to run without triggering the pop-up. I have changed security settings,
I've gone through the on-line user manual, and I've tried to find an Outlook
application security property that I can disable as part of code execution.

So, does anybody know a way that I can either deactivate this feature or
enable Outlook to recognize that the procedure is being called by Outlook
itself and not by a rogue program?
 
S

Sue Mosher [MVP-Outlook]

SenderName, Body, and HTMLBody properties are all blocked properties, because they can contain address information. See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions. Deactivating the popups is not an option for an end user.
 
G

Guest

That's what I suspected. Thanks for the help.

Sue Mosher said:
SenderName, Body, and HTMLBody properties are all blocked properties, because they can contain address information. See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions. Deactivating the popups is not an option for an end user.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Somneone else pointed me to the <a
href="http://www.mapilab.com/outlook/security/">MAPILab Outlook Security
Add-in</a>. I installed the add-in. The first time my code ran, I told the
Add-In to allow access and to remember the reply. Now my code runs without
triggering the pop-up. So now my custom junk mail filters are fully
automated, as I wanted them to operate.
 
G

Guest

Sorry about the year old response

Does that solution still work for you?
If an add-in can deal with this issue, why can't we code a solution?
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top