ContentControlListEntry.MoveUp method (Word)

Moves an item in a drop-down list or combo box content control up one item, so that it is before the item that originally preceded it.

Syntax

expression. MoveUp

expression An expression that returns a ContentControlListEntry object.

Example

The following example moves the last item in the drop-down list or combo box content control up, so that it becomes the first item.

Dim objCC As ContentControl 
Dim objCL As ContentControlListEntry 
Dim intCount As Integer 
 
Set objCC = ActiveDocument.ContentControls.Item(3) 
 
If objCC.Type = wdContentControlComboBox Or _ 
 objCC.Type = wdContentControlDropdownList Then 
 
 Set objCL = objCC.DropdownListEntries.Item(objCC.DropdownListEntries.Count) 
 
 For intCount = 1 To objCC.DropdownListEntries.Count 
 objCL.MoveUp 
 Next 
 
End If

See also

ContentControlListEntry 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.