问题:OFFCIE2010功能区最小化JS代码
解决方法:
function ToggleRibbon() {
var officever = OFFICE_CONTROL_OBJ.getOfficeVer();
if ("12" == officever) {
OFFICE_CONTROL_OBJ.ActiveDocument.Application.ExecuteExcel4Macro('SHOW.TOOLBAR("Ribbon",False)'); //2010Ribbon全部隐藏
} else if ("14" == officever) {
OFFICE_CONTROL_OBJ.ActiveDocument.CommandBars.ExecuteMso("MinimizeRibbon"); //2010Ribbon最小化
}
else alert("此功能只限office2007以上使用");
}
|