Share via


CommandBars.GetImageMso Method

Office Developer Reference
Aa434604.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."

Returns an IPictureDisp object of the control image identified by the idMso parameter scaled to the dimensions specified by width and height.

Syntax

expression.GetImageMso(idMso, Width, Height)

expression   An expression that returns a CommandBars object.

Parameters

Name Required/Optional Data Type Description
idMso Required String Identifier for the control.
Width Required Integer The width of the image.
Height Required Integer The height of the image.

Return Value
IPictureDisp

Remarks

The Width and Height parameters must be between 16 and 128.

Example

The following sample returns a 32x32 version of the Paste icon as an IPictureDisp object.

Visual Basic for Applications
  Application.CommandBars.GetImageMso("Paste", 32, 32)

See Also