Share via


ContentControlListEntry.Delete Method

Word Developer Reference

Deletes the specified item in a combo box or drop-down list content control.

Syntax

expression.Delete

expression   An expression that returns a ContentControlListEntry object.

Example

The following example deletes a drop-down list item if the display text of the item is "Other".

Visual Basic for Applications
  Dim objCC As ContentControl
Dim objCL As ContentControlListEntry

For Each objCC In ActiveDocument.ContentControls If objCC.Type = wdContentControlComboBox Or _ objCC.Type = wdContentControlDropdownList Then For Each objCL In objCC.DropdownListEntries If objCL.Text = "Other" Then objCL.Delete Next End If Next

See Also