CommandCollection.Filter

説明

指定されたキーワードのいずれかに一致するすべてのCommandオブジェクトから構成される、新しいコレクションを作成します。

C#構文

CommandCollection CommandCollection.Filter( Object Keywords );

スクリプト構文

oReturn = CommandCollection.Filter( [Keywords] );

戻り値

CommandCollection

パラメータ

パラメータ タイプ 説明
Keywords String、または文字列のArray 一致するキーワード

VBScript の例

' 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

関連項目

Command Application