Unspecified Error: -2147467259 Using OL2000 VBA

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

Unspecified Error: -2147467259 Using OL2000 VBA
Can't use OutlookSecurityManager in OL2000 macro 
Kenneth Kirby




Posts: 1
Joined: 2005-08-10
In Outlook I've written a macro that's triggered by the ItemAdd event of my Inbox. The macro looks in a Contacts subfolder for all of the contacts and forwards the message to them, after tweaking the subject and adding a signature line. Using that, I can have a workstation running as a cheap list serve. The code works great, except that I get the security warnings, so it can't run unless someone sits at the computer and approves the security warnings.

So I bought Outlook Security Manager (osm) and have tried my best to figure out the documentation. Before the "guts" of my macro I put the following:

----------------------------------
Dim osm As OutlookSecurityManager
On Error GoTo PROC_ERR

'Turn off Outlook Security.
Set osm = New OutlookSecurityManager
osm.DisableSMAPIWarnings = True
osm.DisableOOMWarnings = True
osm.DisableCDOWarnings = True
----------------------------------

At the end of the macro I set all the Disable properties to False.

When the macro runs, I get -2147467259: Unspecified Error. I've tried the ConnectTo method but get -2147024809: The parameter is incorrect. Here's the code I'm trying to use for that:

----------------------------------
Dim app As Object
Dim osm As OutlookSecurityManager
On Error GoTo PROC_ERR

Set app = CreateObject("Outlook.Application")

'Turn off Outlook Security.
Set osm = New OutlookSecurityManager
osm.ConnectTo app
-----------------------------------

I'm using Version 1.3 of osm. I put the redistributable files in the Common Files directory, ran regsvr32, and added a reference to osmax.ocx. My version of Outlook is 2000 SP-3 (9.0.0.6627)--Internet Mail Only.

Kenneth.
Posted 10 Aug, 2005 13:27:37 Top
Dmitry Kostochko


Add-in Express team


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

You don't need to disable ALL types of warnings. Try to disable Outlook Object Model warnings (the DisableOOMWarnings property) only.

Posted 01 Sep, 2005 07:08:27 Top