HI
i was able to debug without any errors now.
but this is just opening the outlook and going out of debug mode.
thats it.
its not hitting the break points.
i'm using only the ItemContextMenuDisplay event only.
how to go into debug mode and check whether the selected item's context menu is getting added with my customized item.
this is the code:
Private Sub Application_ItemContextMenuDisplay(ByVal CommandBar As Office.CommandBar, ByVal Selection As Outlook.Selection)
Static intCounter As Integer
On Error GoTo ErrRoutine
' Increment or reset the counter
If intCounter 1 Or intCounter 100 Then
intCounter = 1
Else
intCounter = intCounter + 1
End If
' Add the menu.
Dim objMenu As Microsoft.Office.Core.CommandBarControl
Dim cmbBar As Microsoft.Office.Core.CommandBar
objMenu = cmbBar.Controls.Add(Office.MsoControlType.msoContr olButton)
objMenu.Caption = "Displayed " & intCounter & " times"
objMenu.Enabled = True
objMenu.BeginGroup = True
EndRoutine:
On Error GoTo 0
Exit Sub
ErrRoutine:
MsgBox(Err.Number & " - " & Err.Description, _
vbOKOnly Or vbCritical, _
"Application_ItemContextMenuDisplay")
GoTo EndRoutine
End Sub
please tell me what i'm missing.
what else events i need to add...?
i've given the references to Outlook 11.0 & 12.0 dlls and also to Office dll also.
still i'm not able to see my item in the context menu.
waiting for ur reply.
Thanks & regards,
Muppidi
|