Word 2016 - VBA - I still receive A program is trying to access e-mail address information stored in Outlook. If this is unexpected, click Deny and verify your antivirus software is up-to-date after installing outlook security manager

Add-in Express™ Support Service
That's what is more important than anything else

Word 2016 - VBA - I still receive A program is trying to access e-mail address information stored in Outlook. If this is unexpected, click Deny and verify your antivirus software is up-to-date after installing outlook security manager
 
Subscribe
Andrei Smolin


Add-in Express team


Posts: 14140
Joined: 2006-05-11
Luc,

It's difficult to tell why the issue occurs. What code line produces the issue?

Still, your code should be polished a bit. First off, you should set OlSecurityManager.DisableOOMWarnings = False whether an error occurs or not. Also, you create an Outlook.Application twice in your code; this looks like an unnecessary complication. You need to handle a scenario when an error occurs while you call OlSecurityManager.ConnectTo OlApp; the error occurs if secman.dll, or secman64.dll, or both aren't registered at this moment.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Oct, 2017 06:11:28 Top
Luc Buys




Posts: 6
Joined: 2017-09-28
Andrei,

It looks we are getting the error message here :

Set GaddressList = NSAddr.Session.AddressLists("Contacts")
'--- boolean op false, telkens als we door deze routine lopen ---

Set OlSecurityManager = New AddInExpress.OutlookSecurityManager
OlSecurityManager.ConnectTo OlApp
OlSecurityManager.DisableOOMWarnings = True

Best regards,

Luc Buys
Posted 05 Oct, 2017 08:48:32 Top
Andrei Smolin


Add-in Express team


Posts: 14140
Joined: 2006-05-11
Hello Luc,

At https://msdn.microsoft.com/VBA/Outlook-VBA/articles/protected-properties-and-methods, I see that AddressLists.Item() method is protected. This mean you need to call it *after* you call OlSecurityManager.DisableOOMWarnings = True.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Oct, 2017 09:35:53 Top
Luc Buys




Posts: 6
Joined: 2017-09-28
Hello Andrei,

It works after changing my code.

Many thanks and best regards,

Luc Buys
Posted 10 Oct, 2017 07:32:36 Top
Andrei Smolin


Add-in Express team


Posts: 14140
Joined: 2006-05-11
You are welcome!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Oct, 2017 05:12:50 Top