A given command's caption.

Usage

Set_Property(OLECtrlEntID, "OLE.CommandCaption[key]", Text)

Values

Text can contain anything.

Default: ""

Indices

IndexDescription
keyThe target command's unique key

Remarks

The CommandCaption property gets or sets the current text of a given command. When you defined the command during the Init method, you gave it a unique key. You must pass that key in order to get or set its text. Since a command can be associated with multiple buttons, changing the text of the command will change the text of all its buttons at once.

Example

// Change the text of all SAVE buttons at once
Set_Property(@Window:".OLE_RIBBON", "OLE.CommandCaption[SAVE]", "Save it!")

See Also

CommandEnabled

  • No labels