ListEntry Object
Collapse the table of content
Expand the table of content

ListEntry Object (Word)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents an item in a drop-down form field. The ListEntry object is a member of the ListEntries collection. The ListEntries collection includes all the items in a drop-down form field.

Use ListEntries(Index), where Index is the list entry name or the index number, to return a single ListEntry object. The index number represents the position of the entry in the drop-down form field (the first item is index number 1). The following example deletes the "Blue" entry from the drop-down form field named "Color."

ActiveDocument.FormFields("Color").DropDown _ 

The following example displays the first item in the drop-down form field named "Color."

MsgBox _ 

Use the Add method to add an item to a drop-down form field. The following example inserts a drop-down form field and then adds "red," "blue," and "green" to the form field.

Set myField = _ 
 ActiveDocument.FormFields.Add(Range:=Selection.Range, _ 
With myField.DropDown.ListEntries 
 .Add Name:="Red" 
 .Add Name:="Blue" 
 .Add Name:="Green" 
End With
© 2016 Microsoft