SteveGoodman
New Member
- Joined
- Sep 19, 2002
- Messages
- 41
I am trying to add a menu item to the bottom of the context menu that appears when you right click on a cell in the Page Break Preview mode. I can get it to appear on the when we are in the Normal mode, but can't get one to appear in this preview mode.
All I think is the problem is that I have the wrong id for menu. I was using the id because I thought that both menus were called CELL.
Any help would be great, here is my code.
Do While True
Set cbReporting = Application.CommandBars(iMenuID)
Set cbcReporting = cbReporting.FindControl(msoControlPopup, , gsAppName)
If Not (cbcReporting Is Nothing) Then cbcReporting.DELETE
'Now the cell popup
Set cbcReporting = Application.CommandBars(iMenuID).Controls.Add(msoControlPopup)
cbcReporting.Caption = gsAppName
cbcReporting.Tag = gsAppName
cbcReporting.BeginGroup = True
Set cbReporting = cbcReporting.CommandBar
cbReporting.Controls.Add msoControlButton, , , 1, True
cbReporting.Controls(1).Caption = "menuItem"
cbReporting.Controls(1).OnAction = "MenuItem"
cbReporting.Controls(1).FaceId = 462
If iMenuID = 27 Then Exit Do
iMenuID = 27
Loop
All I think is the problem is that I have the wrong id for menu. I was using the id because I thought that both menus were called CELL.
Any help would be great, here is my code.
Do While True
Set cbReporting = Application.CommandBars(iMenuID)
Set cbcReporting = cbReporting.FindControl(msoControlPopup, , gsAppName)
If Not (cbcReporting Is Nothing) Then cbcReporting.DELETE
'Now the cell popup
Set cbcReporting = Application.CommandBars(iMenuID).Controls.Add(msoControlPopup)
cbcReporting.Caption = gsAppName
cbcReporting.Tag = gsAppName
cbcReporting.BeginGroup = True
Set cbReporting = cbcReporting.CommandBar
cbReporting.Controls.Add msoControlButton, , , 1, True
cbReporting.Controls(1).Caption = "menuItem"
cbReporting.Controls(1).OnAction = "MenuItem"
cbReporting.Controls(1).FaceId = 462
If iMenuID = 27 Then Exit Do
iMenuID = 27
Loop