Jeffrey Sulit
Posts: 1
Joined: 2006-10-09
|
Hi,
I am developing a COM Add-in for Outlook 2003 using VB6 and the Outlook Security Manager 1.5 worked fine in the debug mode. But when i tried to install my compiled Add-in, run Outlook and send an email a run-time error appeared!
--------------------------------------------------------------------------
The run-time error was this:
Run-time error '-2147024809(80070057)':
The parameter is incorrect
--------------------------------------------------------------------------
My code goes like this:
Private Sub olApp_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim OSM As New AddInExpress.OutlookSecurityManager
Dim ad As String
OSM.ConnectTo olApp
OSM.DisableOOMWarnings = True
On Error GoTo Finally
ad = "[Your ad goes here]"
Item.Body = Item.Body & vbCr & vbCr & ad
Item.Save
Finally:
OSM.DisableOOMWarnings = False
End Sub
--------------------------------------------------------------------------
Can somebody tell me what's wrong? Thank you!
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Jeffrey,
You don't need to call the ConnectTo method if a COM Add-in for Outlook is written in VB6 and the RELEASE mode. In case of the DEBUG mode (testing under VB6 IDE) this method is needed.
|
|