CopyFace Method

Microsoft Office Visual Basic

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

expression.CopyFace

expression    Required. An expression that returns 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.

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