Showing posts with label Toggle Toolbar Visibility. Show all posts
Showing posts with label Toggle Toolbar Visibility. Show all posts

Tuesday, July 6, 2010

Toggle Toolbar Visibility

The script can be added to a button or wherever appropriate. I used this for on-demand dashboards both to save me the steps of having to make each component viewable, as well as for advanced end-users.

if (Application.Toolbars["Standard"].Visible==false)
{
Application.Toolbars["Standard"].Visible = true;
Application.Toolbars["Formatting"].Visible = true;
Application.ShowStatusBar = true;

Application.ActiveDocument.ShowSectionTitleBar = true;

}
else
{
Application.Toolbars["Formatting"].Visible = false;
Application.Toolbars["Standard"].Visible = false;
Application.ShowStatusBar = false;

This is used is most often used in conjunction with an “On Startup” document script such as:

Application.ShowStatusBar = false;
ActiveDocument.ShowCatalog = false;
ActiveDocument.ShowSectionTitleBar = false;
Toolbars["Standard"].Visible = false;
Toolbars["Formatting"].Visible = false;
Toolbars["Sections"].Visible = false;

test

test