OutlookSecurityManager error

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

OutlookSecurityManager error
Error running VBA code to use OutlookSecurityManager (ActiveX) 
Todd Knudsen




Posts: 1
Joined: 2006-08-08
I'm running the following code in Microsoft Access VBA:

    Dim ol As Object
    Dim osm As Object
    
    Set ol = CreateObject("Outlook.Application")
    Set osm = CreateObject("AddInExpress.OutlookSecurityManager")
    
    If Not osm Is Nothing Then
        osm.ConnectTo (ol)
        osm.DisableOOMWarnings = True
    End If


I get the following error in the line that reads: osm.ConnectTo (ol)

Error: The parameter is incorrect.

I'm using Outlook 2003 SP2.
Execution is getting past 'Set osm = CreateObject("AddInExpress.OutlookSecurityManager")' which leads me to believe that the object is getting created but when the connection to Outlook is attempted the error occurs.

Any help would be appreciated.

Thanks

Todd

Posted 08 Aug, 2006 17:43:40 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Todd,

See the code below:

    Dim ol As Object 
    Dim osm As Object 
     
    Set ol = CreateObject("Outlook.Application") 
    Set osm = CreateObject("AddInExpress.OutlookSecurityManager") 
     
    If Not osm Is Nothing Then 
        [B]Call[/B] osm.ConnectTo (ol) 
        osm.DisableOOMWarnings = True 
    End If 


Posted 14 Aug, 2006 05:08:01 Top