CopyFace Method

CommandBarButton.CopyFace Method (Office)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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


Note Note

The use of CommandBars in some Microsoft Office applications has been superseded by the new ribbon component of the Microsoft Office Fluent user interface. For more information, search Help for the keyword "ribbon."

expression .CopyFace

expression A variable that represents a CommandBarButton object.

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

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
Show:
© 2016 Microsoft