Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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)
ContentControlListEntry Add(
	string Text,
	string Value,
	int Index
)

Parameters

Text
Type: System.String
Specifies the display text for the list item. Corresponds to the Text property for a ContentControlListEntry object.
Value
Type: System.String
Specifies the value of the list item. Corresponds to the Value property for a ContentControlListEntry object. If omitted, the Value property is equal to the Text property.
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.

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.