Disable Office 2003 Toolbars and Toolbar Button
Download Office Viewer Component and View Sample Projects
Disables Office 2003 Toolbar or Toolbar Button
boolean UpdateOffice2003ToolbarButton([in] long OfficeID,
[in] boolean Visible, [in] boolean Enabled);
Disables or hides the office 2000, 2003 toolbar button.
OfficeID: The office MSO id for every button.
Visible: True to set the command button visible.
Enabled: True to enable the command button.
The function works only in the Office 2000/2003 version.
The following vbscript shows how to hide the SaveAs and save button.
Sub DocumentOpenedEvent ()
EDOffice.UpdateOffice2003ToolbarButton 3 , false, false 'save button
EDOffice.UpdateOffice2003ToolbarButton 748 , false, false 'saveas button
End Sub
<SCRIPT FOR=OA1 EVENT= DocumentOpened ()>
DocumentOpenedEvent()
</SCRIPT>
Invisible Office 2003 Toolbar
boolean InvisibleOffice2003Toolbar([in] BSTR ToolbarName);
Disables or hides the office 2000, 2003 toolbar.
ToolbarName: The office 2000, 2003 commandbar name.
The following VB script shows how to hide the standard toolbar, web toolbar and
formatting toolbar.
Sub DocumentOpenedEvent ()
EDOffice.InvisibleOffice2003Toolbar "Standard"
EDOffice.InvisibleOffice2003Toolbar "Web"
EDOffice.InvisibleOffice2003Toolbar "Formatting"
End Sub
<SCRIPT FOR=OA1 EVENT= DocumentOpened ()>
DocumentOpenedEvent()
</SCRIPT>