Show or hide Office menu bar

> Edraw Tip > Show or hide Office menu bar
author
Posted by James Freeman |
Show or hide Word, Excel, PowerPoint menu bar programmatically.

Question

Office Ribbons interface gave users easy access to several tasks and segregated them to provide one click access to otherwise hidden features. Office 2010 also supports the same ribbons.

However not many people need the new ribbon feature and many people want to get rid of them.

Solution

This article explains how to hide menu bar in the Word and Excel documents programmatically.

Firstly, please make sure you have installed Edraw Office Viewer Component V7.x. If you haven't the version, please download it here.

Then the following example will demo how to open a word or excel document without menu bar on a VB.NET page.

Steps

  1. Install Edraw Office Viewer Component.
  2. Create a blank VB.NET application.
  3. Add Edraw Office Viewer Component in your form through customizing toolbox window as shown below.
  4. Select the Edraw Office Viewer Component and click the Property Window. Add event NotifyCtrlReady.
  5. Add the codes:

Private Sub btnOpenExcel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenExcel1.Click
AxEDOffice1.OpenFileDialog()
End Sub
Private Sub AxEDOffice1_NotifyCtrlReady(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxEDOffice1.NotifyCtrlReady
AxEDOffice1.ShowMenubar(False)
AxEDOffice1.Toolbars = False
End Sub

Run the project and you can see the Excel program has hide the menu bar and toolbar. Note: The Ribbon bar in Office 2007/2010 is not a commandbar. So you need to set the toolbars as false to hide the ribbon menu bar. For the Office 2000/2003, the ShowMenubar(false) will hide the standard menu in the office. Then the Toolbars will hide the standard commandbar.

hide Office menu bar

Free Download Office Viewer Component and View Sample Projects

Free Download Office Viewer Component

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!