2
2R
Dear all,
I am new in writing Add-in but I am an advanced programmer in VB.net. I am trying to test writing some add-in for Outlook XP. The testing program is just to show a messge box when it is connected, but no matter I try, I fail...
relevant code below (class 1): -
--------------------------------------------------------------------------------
Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
MsgBox "no"
On Error Resume Next
Select Case ConnectMode
Case ext_cm_Startup
Msgbox "yes"
Case ext_cm_AfterStartup
Case ext_cm_CommandLine 'Not used in Office 2000 COM add-ins
Case ext_cm_External 'Not used in Office 2000 COM add-ins
End Select
Call InitHandler(Application, AddInInst.ProgId)
End Sub
--------------------------------------------------------------------------------
Private Sub InitHandler(oApp As Outlook.Application, sProgID As String)
On Error Resume Next
Set moOL = oApp
Set moNS = oApp.GetNamespace("MAPI")
Set moActiveExplorer = moOL.ActiveExplorer
msProgID = sProgID
End Sub
--------------------------------------------------------------------------------
Exactly I write that in reference to Ken Slovak's book. I remove all others non-relevant subroutines.
I am using Office XP Developer and the MOD in writing the Add-in.
Step:
1. In the Add-in Desinger -> type addin display, description, select "Microsoft Outlook" in Application, "Microsoft Outlook 10.0" in Application Version, "Startup" in Initial Load Behaviour.
2. Save the add-in
3. compile the add-in to my program directory
4. Check if the "Custom Add-in" has it checked.
5. Quit Outlook and restart.
But there is no response.
Thanks.
I am new in writing Add-in but I am an advanced programmer in VB.net. I am trying to test writing some add-in for Outlook XP. The testing program is just to show a messge box when it is connected, but no matter I try, I fail...
relevant code below (class 1): -
--------------------------------------------------------------------------------
Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
MsgBox "no"
On Error Resume Next
Select Case ConnectMode
Case ext_cm_Startup
Msgbox "yes"
Case ext_cm_AfterStartup
Case ext_cm_CommandLine 'Not used in Office 2000 COM add-ins
Case ext_cm_External 'Not used in Office 2000 COM add-ins
End Select
Call InitHandler(Application, AddInInst.ProgId)
End Sub
--------------------------------------------------------------------------------
Private Sub InitHandler(oApp As Outlook.Application, sProgID As String)
On Error Resume Next
Set moOL = oApp
Set moNS = oApp.GetNamespace("MAPI")
Set moActiveExplorer = moOL.ActiveExplorer
msProgID = sProgID
End Sub
--------------------------------------------------------------------------------
Exactly I write that in reference to Ken Slovak's book. I remove all others non-relevant subroutines.
I am using Office XP Developer and the MOD in writing the Add-in.
Step:
1. In the Add-in Desinger -> type addin display, description, select "Microsoft Outlook" in Application, "Microsoft Outlook 10.0" in Application Version, "Startup" in Initial Load Behaviour.
2. Save the add-in
3. compile the add-in to my program directory
4. Check if the "Custom Add-in" has it checked.
5. Quit Outlook and restart.
But there is no response.
Thanks.