I have a content controlled dropdown box created in Word. I need to be able to capture the index number of the chosen item in the box. I already know how to capture the text itself after someone selects an item.
That code is: curVal = ContentControl.Range.Text
but I can not figure out how to capture the index.
That's as simple as:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
Dim i As Long
With CCtrl
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
MsgBox i: Exit For
End If
Next
End With
End Sub