CommandCollection.Filter
 
 
 

CommandCollection.Filter

Description

Creates a new collection composed of all Command objects matching any of the provided keywords.

C# Syntax

CommandCollection CommandCollection.Filter( Object Keywords );

Scripting Syntax

oReturn = CommandCollection.Filter( [Keywords] );

Return Value

CommandCollection

Parameters

Parameter Type Description
Keywords String or Array of Strings Keywords to match

Examples

VBScript Example

' Display information about a command
SUB ShowCommand( ByRef oCommand )
logmessage "--------------------------------"
logmessage "Name: " & oCommand.Name
logmessage "FileName: " & oCommand.FileName
logmessage "Handler: " & oCommand.Handler
logmessage "Language: " & oCommand.language
logmessage "Type: " & oCommand.type
END SUB
set oAllCommands = Application.Commands
' Get all custom commands
set oCustomCommands = oAllCommands.Filter("Custom")
' Display all custom commands
FOR EACH oCommand IN oCustomCommands
ShowCommand oCommand
NEXT

See Also

Command Application