HookChoices Object

A HookChoices object represents the list of choices presented by a CHOICE_LIST hook.

The HookChoices object is a special object that is invisible except inside a CHOICE_LIST hook. This object provides the AddItem method, which you can use to add a new item to the list. You can use the AddItems method to add a list of values.

The HookChoices object is stored in a variable called choices (for hooks, not global scripts) and you can only access it by that name.

Note: The HookChoices object is for Visual Basic only. For Perl, use a reference to an array of strings to return a choice list or to store a collection of strings. See "Creating a dependent choice list".