View Single Post
 
Old 11-15-2018, 02:18 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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
  Select Case .Tag
    Case "List1": strFolder = ActiveDocument.Path & "\list1\"
    Case "List2": strFolder = ActiveDocument.Path & "\list2\"
    Case "List3": strFolder = ActiveDocument.Path & "\list3\"
  End Select
  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.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote