application events

S

Selgin

Hi

I'm developing a VB6 COM Add-In for outlook 2000. I have the following code

Private WithEvents olApp As Outlook.Applicatio

Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant
Set olApp = Applicatio
...

When I install and run the add-in, I get the error message
"Run-time error '459'
Object or class does not support the set of events

Any help

Selgin
thanks

Selgin
 
E

Eric Legault [MVP - Outlook]

Your code looks valid to me. I can't offer anything constructive except to
suggest using the Outlook COM Add-in Template at
http://www.microeye.com/resources/code.htm for these kinds of projects.
This is a great best practices example for developing COM Add-ins the
foolproof way.

--
Eric Legault, B.A., MCP, MCSD, MVP - Outlook
ImagiNET Resources Corp.
http://www.imaginets.com


Selgin said:
Hi,

I'm developing a VB6 COM Add-In for outlook 2000. I have the following code:

Private WithEvents olApp As Outlook.Application

Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal
ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As
Object, custom() As Variant)
 

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