Share via


CommandBarButton.CopyFace Method

Office Developer Reference

Copies the face of a command bar button control to the Clipboard.

Aa432147.vs_note(en-us,office.12).gif  Note
The use of CommandBars in some Microsoft Office applications has been superseded by the new Ribbon user interface. For more information, search help for the keyword "Ribbon."

Syntax

expression.CopyFace

expression   A variable that represents a CommandBarButton object.

Remarks

Use the PasteFace method to paste the contents of the Clipboard onto a button face.

Example

This example finds the built-in Open button, copies the button face to the Clipboard, and then pastes the face onto the Spelling and Grammar button.

Visual Basic for Applications
  Set myControl = CommandBars.FindControl(Type:=msoControlButton, Id:=23)
myControl.CopyFace
Set myControl = CommandBars.FindControl(Type:=msoControlButton, ID:=2)
myControl.PasteFace

See Also