View Single Post
 
Old 11-15-2018, 02:35 PM
thuriel thuriel is offline Windows 10 Office 2019
Novice
 
Join Date: Oct 2018
Location: Buenos Aires, Argentina
Posts: 7
thuriel is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Try:
Code:
Private Sub Document_ContentControlOnEnter(ByVal CCtrl As ContentControl)
Application.ScreenUpdating = False
Dim strFolder As String, strFile As String
With CCtrl
  .DropdownListEntries.Clear
  .Type = wdContentControlText
  .Range.Text = ""
  .Type = wdContentControlDropdownList
   Case .Tag
    Case "List1": strFolder = ActiveDocument.Path & "\list1\"
    Case "List2": strFolder = ActiveDocument.Path & "\list2\"
    Case "List3": strFolder = ActiveDocument.Path & "\list3\"
  End 
  strFile = Dir(strFolder & "*.doc", vbNormal)
  While strFile <> ""
    .DropdownListEntries.Add strFile
    strFile = Dir()
  Wend
End With
Application.ScreenUpdating = True
End Sub
Your can add/delete dropdowns and their list folders, as desired.

you're the best!! This is very simplifying.
Reply With Quote