R
Russell Mangel
I am unable to catch the MailItem Reply Event:
Can someone help? I have been hacking on this for 2 days.
I am using VB6 (COM-ADDIN)
Outlook 2000 (No SR installed)
' Begin Code
Option Explicit
Dim WithEvents oApplication As Outlook.Application
Dim WithEvents oNameSpace As Outlook.NameSpace
Dim WithEvents colInsp As Outlook.Inspectors
Dim WithEvents objMailItem As Outlook.MailItem
Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal
ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As
Object, custom() As Variant)
Set oApplication = Application
Set oNameSpace = oApplication.GetNamespace("MAPI")
Set colInsp = oApplication.Inspectors
End Sub
Private Sub colInsp_NewInspector(ByVal Inspector As Inspector)
Dim objItem As Object
Dim objInsp As Inspector
Set objInsp = Inspector
On Error Resume Next
Set objItem = objInsp.CurrentItem
Select Case objItem.Class
Case olMail
Set objMailItem = objItem
End Select
End Sub
Private Sub objMailItem_Open(Cancel As Boolean)
'This is working okay
Debug.Print "Opening"
End Sub
Private Sub objMailItem_Reply(ByVal Response As Object, Cancel As Boolean)
'This line never prints if I click on Reply (to MailItem)
Debug.Print "Reply"
End Sub
'End Code
Can someone help? I have been hacking on this for 2 days.
I am using VB6 (COM-ADDIN)
Outlook 2000 (No SR installed)
' Begin Code
Option Explicit
Dim WithEvents oApplication As Outlook.Application
Dim WithEvents oNameSpace As Outlook.NameSpace
Dim WithEvents colInsp As Outlook.Inspectors
Dim WithEvents objMailItem As Outlook.MailItem
Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal
ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As
Object, custom() As Variant)
Set oApplication = Application
Set oNameSpace = oApplication.GetNamespace("MAPI")
Set colInsp = oApplication.Inspectors
End Sub
Private Sub colInsp_NewInspector(ByVal Inspector As Inspector)
Dim objItem As Object
Dim objInsp As Inspector
Set objInsp = Inspector
On Error Resume Next
Set objItem = objInsp.CurrentItem
Select Case objItem.Class
Case olMail
Set objMailItem = objItem
End Select
End Sub
Private Sub objMailItem_Open(Cancel As Boolean)
'This is working okay
Debug.Print "Opening"
End Sub
Private Sub objMailItem_Reply(ByVal Response As Object, Cancel As Boolean)
'This line never prints if I click on Reply (to MailItem)
Debug.Print "Reply"
End Sub
'End Code