Code:
Private Sub CommandButton1_Click()
Dim bListAll As Boolean
Dim strList As String
Dim lngIndex As Long
'Do you want to list "all" items in the listbox?
bListAll = True
'or do you want to list the item or items selected? Then set the variable above to False
If bListAll Then
For lngIndex = 0 To ListBox1.ListCount - 1
If strList = vbNullString Then
strList = ListBox1.List(lngIndex)
Else
strList = strList & vbCr & ListBox1.List(lngIndex)
End If
Next lngIndex
Else
For lngIndex = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(lngIndex) Then
If strList = vbNullString Then
strList = ListBox1.List(lngIndex)
Else
strList = strList & vbCr & ListBox1.List(lngIndex)
End If
End If
Next lngIndex
End If
ActiveDocument.Range.Text = strList
Hide
End Sub