How to disable the file command buttons
Posted by office viewer on February 23rd, 2008The Office Viewer Component provides the method “EnableFileCommand” to allow the developers to disable the File command in the MS office program.
If you are developing a web application, you can set the initial functions in the “NotifyCtrlReady” event.
function OA1_NotifyCtrlReady() {
document.OA1.EnableFileCommand(0) = false; //FileNew = 0
}
<SCRIPT LANGUAGE=javascript FOR=OA1 EVENT=NotifyCtrlReady>
<!–
OA1_NotifyCtrlReady();
//–>
</SCRIPT>
More File Command ENUMS:
typedef enum FileCommandType
{
FileNew = 0,
FileOpen,
FileClose,
FileSave,
FileSaveAs,
FilePrint,
FilePageSetup,
FileProperties,
FilePrintPreview
} FileCommandType;
Recent Comments