Outlook addin not working

A

antgel

Hi all,

I am trying to use Outlook 2002's VB editor to write an add-in. I've
never done this before, so as a start, I thought I would just add
MsgBoxes to the common events. The code's pasted below, and is based on
a template in the VBA Help.

However, no MsgBoxes appear when I:
o start or close Outlook with the add-in enabled
o enable or disable the add-in dll from Tools -> Options etc...

What could I be doing wrong? The project does have an AddInManager, and
the code is in a class module called Class1. Do I need to write any
initialisation code or something?

(Replace usenet with antony to reply to private email, although group
replies are probably better.)

A

Option Explicit

Implements IDTExtensibility2

Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
MsgBox "OnAddInsUpdate"
End Sub

Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
MsgBox "OnBeginShutdown"
End Sub

Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object,
ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal
AddInInst As Object, custom() As Variant)
MsgBox "OnConnection"
End Sub

Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As
AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
MsgBox "OnDisconnection"
End Sub

Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
MsgBox "OnStartupComplete"
End Sub
 
K

Ken Slovak - [MVP - Outlook]

Was this written using Office Developer and then compiled into a DLL that is
supposed to start when Outlook does?

Do you have the correct registry settings set up for the addin in the HKCU
hive of the registry, with LoadBehavior set to 3 for the addin?

See the general information about COM addins at
http://www.outlookcode.com/d/comaddins.htm and on that page is a COM addin
written in Office Developer 2000 that you can download and examine. It's the
one titled Sample written in VBA with Office 2000 Developer.
 

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