Outlook addin not working

  • Thread starter Thread starter antgel
  • Start date Start date
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
 
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.
 
Back
Top