Thought this might help some people. I was looking for a way to eliminate the 2007 ribbon using VBA.
Unfortunately, you have to use UI editor (http://openxmldeveloper.org/articles/customuieditor.aspx) as well as some VBA.
To do so, type the following vba into a module
save your document, and then open the UI editor, open your document, and enter the following into the window:
Save - and that should eliminate your ribbon. hope this helps.
Unfortunately, you have to use UI editor (http://openxmldeveloper.org/articles/customuieditor.aspx) as well as some VBA.
To do so, type the following vba into a module
PHP:
Option Explicit
Dim Rib As IRibbonUI
Public MyTag As String
'Callback for customUI.******
Sub Ribbon******(ribbon As IRibbonUI)
Set Rib = ribbon
End Sub
Sub GetVisible(control As IRibbonControl, ByRef visible)
If MyTag = "show" Then
visible = True
Else
If control.Tag Like MyTag Then
visible = True
Else
visible = False
End If
End If
End Sub
Sub RefreshRibbon(Tag As String)
MyTag = Tag
If Rib Is Nothing Then
MsgBox "Error, Save/Restart your workbook"
Else
Rib.Invalidate
End If
End Sub
Sub HideEveryTab()
'Hide every Tab, Group or Control(we use Tag:="")
Call RefreshRibbon(Tag:="")
End Sub
save your document, and then open the UI editor, open your document, and enter the following into the window:
PHP:
Save - and that should eliminate your ribbon. hope this helps.