Disable Office 2003 Toolbars and Toolbar Button

> Edraw Tip > Disable Office 2003 Toolbars and Toolbar Button
author
Posted by James Freeman |
Edraw Office Viewer Component allows developers to disable office toolbar or toolbar button by office id. Supports the MS Word, Excel and PowerPoint.

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>

Disables MS Word Standard Command

Disable Office Ribbon Button

Show/Hide Office Menu Bar

download EdrawMind
main page

Get Started! You Will Love This Easy-To-Use Diagram Software

EdrawMax is an advanced all-in-one diagramming tool for creating professional flowcharts, org charts, mind maps, network diagrams, UML diagrams, floor plans, electrical diagrams, science illustrations, and more. Just try it, you will love it!