CommandBarControl methods

The CommandBarControl interface supports the following methods:

Copy([variantToBar], [variantBefore]) 
Returns  No return value 
Description  (Not implemented) 
Usage 
JScript  CommandBarControl_object.Copy([variantToBar], [variantBefore])  
VBScript  CommandBarControl_object.Copy [variantToBar], [variantBefore] 

Delete 
Returns  No return value 
Description  Deletes the specified CommandBarControl from the collection it is contained in. 
Usage 
JScript  CommandBarControl_object.Delete();  
VBScript  CommandBarControl_object.Delete 
Example 
// SoftQuad Script Language JSCRIPT:
var cmdBars = Application.CommandBars;
var cmdBar = cmdBars.item("Standard");
// get the first button
var cmdBarControl = cmdBar.Controls.item(1);
cmdBarControl.Delete();  // delete it from the command bar
Application.alert("deleted command bar button");
cmdBar.Reset();  // bring it back
 

Execute 
Returns  No return value 
Description  Runs the macro or built-in command assigned to the CommandBarControl
Usage 
JScript  CommandBarControl_object.Execute();  
VBScript  CommandBarControl_object.Execute 
Example 
// SoftQuad Script Language JSCRIPT:
var cmdBars = Application.CommandBars;
var cmdBar = cmdBars.item("Standard");
// get the first button
var cmdBarControl = cmdBar.Controls.item(1); 
// execute the built-in command 
cmdBarControl.Execute(); 
 

Move(variantToBar, variantBefore) 
Returns  No return value 
Description  (Not implemented) 
Usage 
JScript  CommandBarControl_object.Move(variantToBar, variantBefore);  
VBScript  CommandBarControl_object.Move variantToBar, variantBefore 

Reset 
Returns  No return value 
Description  Resets the CommandBarControl to its original settings.  
Usage 
JScript  CommandBarControl_object.Reset();  
VBScript  CommandBarControl_object.Reset 


Right arrow
Next Topic
Left arrow
Previous Topic
Table of contents
Table of Contents

Copyright © SoftQuad Software Inc. 1999