AddCommand method

Applies to

This method adds a command to perform an external function.

Use this method to add a command that executes an external function to a ReadSoft Invoices module. The external command behaves exactly as a built-in command.

For example, assume you wrote a program to poll ReadSoft Invoices jobs. You can use this method with other methods to let users access the program by selecting a command on a ReadSoft Invoices menu.

Syntax

object.AddCommand( CommandName As String, ComandObj As Object, CommandMethodName As String)

Part

Description

object

An expression evaluating to an object of a type in the above objects list.

CommandName

The string used to identify this command.

ComandObj

The IDispatch interface containing the method that provides the service.

CommandMethodName

The name of the method in the IDispatch interface that will be invoked when this command is executed.

Error output

Description

CommandExists

A command with the specified name already exists.

NoMoreCommandSlots

No more commands can be added. A maximum of 32 commands can be added.

Related topics

AddCommandToMenu

InitUserDefinedMenu