Share via


FormField.DropDown Property

Word Developer Reference

Returns a DropDown object that represents a drop-down form field. Read-only.

Syntax

expression.DropDown

expression   A variable that represents a FormField object.

Remarks

If the DropDown property is applied to a FormField object that isn't a drop-down form field, the property won't fail, but the Valid property for the returned object will be False.

Example

This example displays the text of the item selected in the drop-down form field named "Colors."

Visual Basic for Applications
  Dim ffDrop As FormField

Set ffDrop = ActiveDocument.FormFields("Colors").DropDown

MsgBox ffDrop.ListEntries(ffDrop.Value).Name

This example adds "Seattle" to the drop-down form field named "Places" in Form.doc.

Visual Basic for Applications
  With Documents("Form.doc").FormFields("Places") _
        .DropDown.ListEntries
    .Add Name:="Seattle"
End With

See Also