View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 171
Default Select more than one item in a Word form's drop-down list?

You would have to use a UserForm with a multi-select listbox.
Something this:

Create a userform with a listbox to contain names and a command button.
In the docucment template incorporate a bookmark "Names" where you
want the selection of names to appear. Populate the list of names
using the Userform initialize event. Insert the selected names at the
bookmark using the command button click event.


Private Sub UserForm_Initialize()
With Me.ListBox1
.AddItem "Bill"
.AddItem "Joe"
.AddItem "Tom"
.AddItem "Mary"
End With
End Sub

Private Sub CommandButton1_Click()
Dim pNames As String
Dim i As Long
pNames = ""
With Me.ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
pNames = pNames & .List(i) & ", "
End If
Next i
End With
pNames = Left(pNames, Len(pNames) - 2) 'Strip off last comma and space.
ActiveDocument.Bookmarks("Names").Range.InsertAfte r pNames
Unload Me
End Sub








kmoses wrote:
Hi all,
I would like to create a form letter in Word that includes a way for users
to select more than one item from a drop-down list or a pop-up list. Any
suggestions please? Thank you!