![]() | Download Help (Windows Only) |
Commands.InsertKind ( cmdKind, managerControl, insertBefore, currentMenuName, allMenuNames, numInserted)
Inserts a new Command object or objects into the collection.
This method uses the menu name the currentMenuName parameter specifies to determine whether to insert entry point items that specify a matching menu hint name when you pass the following values to the cmdKind parameter:
CommandKind_ExecutionEntryPointInsertionMarker
CommandKind_ConfigurationEntryPointInsertionMarker
CommandKind_ExecutionEntryPointDefaultMenuInsertionMarker
CommandKind_ConfigurationEntryPointDefaultMenuInsertionMarker
When an entry point does not specify a menu hint name or the menu hint names do not match any of the menu names listed in the allMenuNames parameter, the method creates commands to insert the entry point menus when you pass the following values to the cmdKind parameter:
CommandKind_ExecutionEntryPointDefaultMenuInsertionMarker
CommandKind_ConfigurationEntryPointDefaultMenuInsertionMarker
cmdKind As CommandKinds
Specifies the type of command to insert. Depending on the value you pass and the state of the application, the method might insert one command, a set of commands, or no commands.
managerControl As Object
[In] Pass a SequenceFileView Manager or ExecutionView Manager control when the command you insert requires it.
insertBefore As Long
[In] Specifies the position in the collection at which to insert the new command. Pass -1 to insert the new command at the end of the collection.
currentMenuName As String
[In] Specifies the name of the menu when you create commands to insert into a menu in a top-level menu bar. Otherwise, pass an empty string.
This method ignores accelerator prefix characters when comparing menu hints to the menu name you pass.
allMenuNames As String
[In] Specifies the name of all top-level menus in order, separated by commas, when you create commands to insert into a menu in a top-level menu bar. Otherwise, pass an empty string. The commands use this to decide into which menu to insert based on the menu hint name.
This method ignores accelerator prefix characters when comparing menu hints to the menu names you pass.
numInserted As Long
[Out] Returns the number of commands the method inserted into the collection.
Helpful
Not Helpful