在注册表: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\下加右键菜单。FlashGet的例子: [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Download All by FlashGet] @="C:\\Program Files\\FlashGet\\jc_all.htm" "contexts"=dword:000000f3
结合上面FlashGet的例子来说,点“Download All by FlashGet”菜单会触发C:\\Program Files\\FlashGet\\jc_all.htm页面里的脚本,并传入值000000f3。你可以打开C:\\Program Files\\FlashGet\\jc_all.htm页面看看FlashGet的脚本页面。
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\下加右键菜单。FlashGet的例子:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Download All by FlashGet]
@="C:\\Program Files\\FlashGet\\jc_all.htm"
"contexts"=dword:000000f3
呵呵,我现在要做的是把Excel嵌到Form里(已经实现),并且也已经得到了Excel的Application,现在想在Excel里点右键的时候,除了Excel自己的菜单外,还有我自己的东西,也就是说怎么在Excel的右键菜单里添加进自己的项目
参考上说:
Office.CommandBars theCommandBars = theExcelApp.CommandBars;
Office.CommandBar theCommandBar = theCommandBars.Add("hahahaha",Office.MsoBarPosition.msoBarPopup,false,false);
可是一执行就出错,异常信息为:未定义的异常。
我真是郁闷呀!