Baffling Error 459 when starting Outlook with addin

M

Mike

"Error 459: Object or class does not support the set of events
in Designer Connect procedure AddinInstance_OnConnection."

This statement is the entire contents of the OnConnection sub.
gBaseClass.InitHandler Application, AddInInst.ProgId

However it's not happening in that actual sub because I have line
numbering and no line number is reported in the error message.

This code is the entire InitHandler sub.
On Error GoTo InitHandler_Error
2 Set objOutlook = olApp
4 Set oObject = olApp6
6 Set NS = oObject.GetNamespace("MAPI")
8 gstrProgID = strProgID
'Declared WithEvents
10 Set objNS = objOutlook.GetNamespace("MAPI")
12 Set colExpl = objOutlook.Explorers
14 Set colInsp = objOutlook.Inspectors
16 Set objExpl = objOutlook.ActiveExplorer
18 Set objInsp = objOutlook.ActiveInspector
On Error GoTo 0
Exit Sub
InitHandler_Error:

Note the error numbers and error trapping so its not happening here
either.

In the IDE I single stepped through the entire code that is used to
launch Outlook and add the button and didn't go through any section
with error trapping so I am totally baffled.

The addin does not load a form it just installs a button on the
toolbar which in turn will launch the addin.

Compiled on Win2000 with Outlook 2000 installed

Installs and runs fine when installed on machine running XP and
Outlook 2003.

Runs fine from VB6 IDE on machine running Win2000 and Outlook 2000.
Fails on same machine if I install it (using an Inno setup) and then
launch outlook.

Where should I look next? Can't single step through it outside of the
IDE.

Thanks
-mike
 
M

Mike

In the IDE I single stepped through the entire code that is used to
launch Outlook and add the button and didn't go through any section
with error trapping so I am totally baffled.

The addin does not load a form it just installs a button on the
toolbar which in turn will launch the addin.


Correction. It doesn't even add a toolbar button until a contact
inspector is opened.

-mike
 
K

Ken Slovak - [MVP - Outlook]

Does that machine have extensibility installed?

If it was compiled on Outlook 2000 and runs on Outlook 2003 then the code
itself would seem to be OK, at least for not causing an immediate exception.
And the error about OnConnection would seem again to point to extensibility
not being there or not registered correctly. Surprising if that's so and
it's the development machine though.
 
M

Mike

Ken Slovak - said:
Does that machine have extensibility installed?

If it was compiled on Outlook 2000 and runs on Outlook 2003 then the code
itself would seem to be OK, at least for not causing an immediate exception.
And the error about OnConnection would seem again to point to extensibility
not being there or not registered correctly. Surprising if that's so and
it's the development machine though.


Problem solved.

It had nothing to do with the code in the add-in.

It was a missing support dll file in the installer.

Steps taken to come to conclusion and start looking elsewhere.

1) Ran fine from IDE

2) Compiled add-in in IDE and add-in was installed in Outlook with no
problems.

3) Installed add-in using a setup program and boom Error 459 when
starting Outlook.

It really was step 2 that made me go "Hey wait a minute..."

It just wasn't the error I expected when a file is missing, so add
this one to possible 459 errors.

-mike
 

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