Show or hide components
Updated at:
Sets the Visible property on a CommandBars object to show or hide a specific UI component.
Demonstration
Hide the component

Show the component

Syntax
expression.CommandBars(CommandBarId).Visibleexpression: the document type application object.Visibleis a read/writeBooleanproperty. Reading the value requiresawaitbecause the SDK call is asynchronous.Example
The following example hides the More Menus button, then reads back the
Visiblevalue to confirm the change.async function example() { await instance.ready(); const app = instance.Application; // Get the More Menus button. const moreMenus = await app.CommandBars('MoreMenus'); // Hide the More Menus button. moreMenus.Visible = false; // Read back the Visible value (returns a Boolean). const visible = await moreMenus.Visible; console.log(visible); // false }
Is this page helpful?