Share via


Window.CommandBars Property

InfoPath Developer Reference

A read-only property that returns a reference to the Microsoft Office CommandBars collection object contained in the window that is associated with the Window object. Read-only

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.CommandBars

expression   An expression that returns a Window object.

Return Value
Object

Remarks

The CommandBars property can be used only by fully trusted forms. If used by a form that is not fully trusted, the CommandBars property will return a "permission denied" error.

Security Level 3: Can be accessed only by fully trusted forms.

Example

In the following example, the CommandBars property of the Window object is used to set a reference to the CommandBars collection object:

JScript
  var objCommandBars;
objCommandBars = Application.ActiveWindow.CommandBars;

See Also