ListEntries.Add method (Word)

Returns a ListEntry object that represents an item added to a drop-down form field.

Syntax

expression.Add (Name, Index)

expression Required. A variable that represents a 'ListEntries' collection.

Parameters

Name Required/Optional Data type Description
Name Required String The name of the drop-down form field item.
Index Optional Variant A number that represents the position of the item in the list.

Return value

ListEntry

Example

This example inserts a drop-down form field in the active document and then adds the items Red, Blue, and Green to the form field.

Set myField = ActiveDocument.FormFields.Add(Range:= _ 
 Selection.Range, Type:= wdFieldFormDropDown) 
With myField.DropDown.ListEntries 
 .Add Name:="Red" 
 .Add Name:="Blue" 
 .Add Name:="Green" 
End With

See also

ListEntries Collection Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.