ContentControlListEntries.Add Method

Adds a new list item to a drop-down list or combo box content control and returns a ContentControlListEntry object.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function Add ( _
    Text As String, _
    Value As String, _
    Index As Integer _
) As ContentControlListEntry
'Usage
Dim instance As ContentControlListEntries
Dim Text As String
Dim Value As String
Dim Index As Integer
Dim returnValue As ContentControlListEntry

returnValue = instance.Add(Text, Value, _
    Index)
ContentControlListEntry Add(
    string Text,
    string Value,
    int Index
)

Parameters

  • Index
    Type: System.Int32
    Specifies the ordinal position of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list.

Return Value

Type: Microsoft.Office.Interop.Word.ContentControlListEntry
ContentControlListEntry

Remarks

List entries must have unique display names. Attempting to add a list item that already exists raises a run-time error.

See Also

Reference

ContentControlListEntries Interface

ContentControlListEntries Members

Microsoft.Office.Interop.Word Namespace