FindCommand

Method of IApplication

Search for existing command by name

  • BSTR strName
  • long pnID = NULL (optional, output)

Return Value

JavaScript

var ppCommandHandler = Application.FindCommand(strName, pnID);

Visual Basic Script

ppCommandHandler = Application.FindCommand strName, pnID

C++

CComPtr<ICommandHandler> pCommandHandler;
HRESULT hr = Application.FindCommand(strName, &nID, &pCommandHandler);