In addition to the methods it inherits from the CommandBarControl interface, the CommandBarButton interface supports two methods, CopyFace and PasteFace.
CopyFace | |
Returns | No return value |
Description | Copies the icon/image of the button to an internal clipboard. |
Usage | |
JScript | CommandBarButton_object.CopyFace(); |
VBScript | CommandBarButton_object.CopyFace |
Example |
// SoftQuad Script Language JSCRIPT: var cmdBars = Application.CommandBars; var cmdBar = cmdBars.item("Standard"); // get the first button var cmdBarButton = cmdBar.Controls.item(1); cmdBarButton.CopyFace(); |
PasteFace | |
Returns | No return value |
Description | Pastes the contents of the internal clipboard onto the specified command bar button control. |
Usage | |
JScript | CommandBarButton_object.PasteFace(); |
VBScript | CommandBarButton_object.PasteFace |
Example |
// SoftQuad Script Language JSCRIPT: var cmdBars = Application.CommandBars; var cmdBar = cmdBars.item("My own bar"); // get the first button var cmdBarButton = cmdBar.Controls.item(1); // copy the graphic from the first button cmdBarButton.CopyFace(); // get the second button var cmdBarButton2 = cmdBar.Controls.item(2); // paste clipboard contents on top of second button cmdBarButton2.PasteFace(); |
Copyright © SoftQuad Software Inc. 1999