Drop Down Lists

  • Thread starter Sue via OfficeKB.com
  • Start date
S

Sue via OfficeKB.com

I am new to VBA. I have a document that is 27 pages long and has approximately 150 drop down fields. The drop down fields will all contain the drop down items. Instead of manually entering the 4 values to each drop down field, how do I set up a macro that will autopopulate all of the drop down boxes with the same information.

Thanks !
S~
 
G

Greg

Sue,

Maybe something like:

Sub ScratchMacro1()

Dim fField As FormField

For Each fField In ActiveDocument.FormFields
If fField.Type = wdFieldFormDropDown Then
With fField.DropDown.ListEntries
..Add Name:="Blue"
..Add Name:="Green"
..Add Name:="Red"
..Add Name:="Yellow"
End With
End If
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top