Get a Display Name from Content Control DropDownList of Word to be automated by VBA in Excel

49 Views Asked by At

I need to get the display name from a drop down in a content control of Word to be filled in the Excel Template by VBA,

I have tried using this code:

With wdDoc
    j = 0
    For Each CCtrl In .ContentControls
      With CCtrl
        Select Case .Type
          Case Is = wdContentControlCheckBox
           j = j + 1
           WkSht.Cells(i, j).Value = .Checked
          Case wdContentControlDate, wdContentControlRichText, wdContentControlText
           j = j + 1
           WkSht.Cells(i, j).Value = .Range.Text
          Case wdContentControlDropdownList
           j = j + 1
           WkSht.Cells(i, j) = .Range.Text
          Case Else
        End Select
      End With
    Next

The result I get is ...... instead of the display name (e.g., A/B/C). Can someone help with this?

0

There are 0 best solutions below