DropDown (object)

<< Click to Display Table of Contents >>

DropDown (object)

Access paths:

Application à Documents à Item à FormFields à Item à DropDown

Application à ActiveDocument à FormFields à Item à DropDown

 1  Description

A DropDown object represents one individual form object of the type DropDown (drop-down list) and allows you to retrieve and change its value.

DropDown is a child object of FormField.

 2  Access to the object

The DropDown object can be accessed solely through its parent object FormField.

Only if the property DropDown.Valid returns the value True, the form object really represents a drop-down list – and not a text field or a check box.

An example:

' Check the type of the first form object. If it is a

' DropDown object, display the number of the selected item.

 

If tm.ActiveDocument.FormFields(1).DropDown.Valid Then

 MsgBox tm.ActiveDocument.FormFields(1).DropDown.Value

End If

 3  Properties, objects, collections and methods

Properties:

Value (default property)

Valid R/O

ListEntries

 

Objects:

Application Application

Parent FormField

Value (property)

Data type: Long

Gets or sets the numeric index of the selected list entry.

Valid (property, R/O)

Data type: Boolean

Returns False if the object is not a DropDown object.

ListEntries (pointer to collection)

Data type: Object

Returns the ListEntries collection with all entries from the selection list. You can use this collection to read and edit the entries in the selection list (delete existing entries and add new ones).

Application (pointer to object)

Data type: Object

Returns the Application object.

Parent (pointer to object)

Data type: Object

Returns the parent object, i.e. an object of the type FormField.