Option Explicit
Sub Test()
Dim cctl As Word.ContentControl
For Each cctl In ThisDocument.Content.ContentControls
'ist cctl eine DropDownListe?
If cctl.Type = wdContentControlDropdownList Then
Exit For
End If
Next
If cctl Is Nothing Then
'-> hier ist Ende, da keine DropDownListe gefunden wurde
Exit Sub
End If
Dim variable As Variant
variable = cctl.Range.Text
MsgBox variable
End Sub
Probier mal. :)
Grüße
|