import an excel list into a word drop-down form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to convert a column in excel into a drop-down list in a word
form. The column is over 400 rows long. How do I do this?
 
Dropdown lists can contain only 25 entries, which in your case is probably a
good thing. Do you really expect users to scroll through a dropdown list of
400 items?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Thanks,
How do I import a 25-item list? All I know how to do is enter each entry
individually.
 
I don't know of any other way, either, but if you post in one of the
programming NGs, someone may be able to tell you how to populate a list
using VBA.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Here is some basic code which will do it:

Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open "C:/Path To/Workbook.xls"
With Selection.FormFields("Dropdown1").DropDown.ListEntries
.Clear
For i = 1 To 25 ' Rows wanted
.Add Name:=xlApp.activesheet.Cells(i, "A") ' in column "A"
Next
End With
xlApp.Quit
Set xlApp = Nothing
 

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

Back
Top