ContentControlListEntry Interface

A ContentControlListEntry object represents a list item in a drop-down list or combo box content control. A ContentControlListEntry object is a member of the ContentControlListEntries collection for a ContentControl object.

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

[GuidAttribute("0C6FA8CA-E65F-4FC7-AB8F-20729EECBB14")]
public interface ContentControlListEntry

Use the Add(String, String, Int32) method of the ContentControlListEntries collection to create a new ContentControlListEntry object. Use the Item[Int32] method, or DropdownListEntries(Index), where Index is the ordinal position of the content control list item, to access an individual list item within the ContentControlListEntries collection.

NoteNote

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

Use the MoveUp() and MoveDown() methods to reposition items in a drop-down list. Use the Select() method to programmatically select a content control list item.

Use the Text property to set the display text for a content control list item, and use the Value property to set a programmatic value that you may use later for processing a form. For example, you may use a content control drop-down list for a list of products. The Text property may contain the name of the product, a display name that a user can easily recognize and understand. The Value property may contain the product number for the product that corresponds to a product number in a database. You can then use the the product number from the Value property to look up product information in a database. Also, the value of the Value property is what is sent to the custom XML data if the content control is mapped to XML data in the data store.

Use the Delete() method to remove an item from a content control drop-down list or combo box.

Community Additions

ADD
Show:
© 2014 Microsoft