RustyCocoPat
03-18-2009, 04:52 AM
Hi. I am now certified insane after having tried to resolve this question for several weeks.
What I want to do is return the name of the current context menu as though I had right-clicked at the selection point. I know how to add menu items to builtin menus like this:
Set myControl = CommandBars("Text").Controls.Add(Type:=msoControlComboBox, Before:=1)
With myControl
.AddItem Text:="First Item", Index:=1
End With
End Sub
but that is not what I want to do as I am not adding a menu item.
I merely want to return the name of the context menu relevant to the selection point because of the rich information it provides about the place in the document (much better than range, story etc IMHO).
I have tried things like msgbox(CommandBars.Name) until the cows came home. No luck.
Thanks in anticipation.
What I want to do is return the name of the current context menu as though I had right-clicked at the selection point. I know how to add menu items to builtin menus like this:
Set myControl = CommandBars("Text").Controls.Add(Type:=msoControlComboBox, Before:=1)
With myControl
.AddItem Text:="First Item", Index:=1
End With
End Sub
but that is not what I want to do as I am not adding a menu item.
I merely want to return the name of the context menu relevant to the selection point because of the rich information it provides about the place in the document (much better than range, story etc IMHO).
I have tried things like msgbox(CommandBars.Name) until the cows came home. No luck.
Thanks in anticipation.