1、你要开启全局事件才行
http://www.foxtable.com/webhelp/scr/0671.htm
2、参考代码
For Each s As object In ContextMenus output.show(s.name)Next