Caption Property

A String value. Gets or sets the name of a menu or menu item.

Applies to: Menu object, MenuItem object

Syntax

[[Let] captionRet = ] object.Caption

[Let] object.Caption = captionSet

The Caption property syntax has these parts:

Part Description
object Required. An expression that returns an object from the Applies to list.
captionRet Optional. A String value.
captionSet Required. An expression that returns a String value.

Remarks

The Caption property contains the name of the menu or a menu item as it's displayed in ConceptDraw for the upper-level user-defined menu, obtained with the CustomMenu property.

Example

This example contains a document-level script.

dim mainMenu as Menu, myMenuItem as MenuItem
' Get reference to a Menu object from thisDoc mainMenu = thisDoc.CustomMenu
' Remove all exisitng menu items mainMenu.RemoveAll() ' Give a name to mainMenu mainMenu.Caption = "My Caption" ' Add a MenuItem object to mainMenu myMenuItem = mainMenu.AddMenuItem(0) ' Name it myMenuItem myMenuItem.Caption = "My Caption 2"