![]() |
|
#5
|
|||
|
|||
|
Actually I managed to make a string from the selected listbox field
![]() ' Make a string from the selected listbox field For var = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(var) = True Then docNameField = docNameField & ListBox1.List(var) _ & vbCrLf End If Next I'm not sure why I'm getting this error though: "The requested member of the collection does not exist" On this line of code: strDocName = ActiveDocument.MailMerge.DataSource.DataFields(doc NameField).Value & ".pdf" Thoughts? It's getting stuck at the docNameField part I think but I don't know why. |
| Tags |
| listbox |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Yet another Multi-Select Listbox in Userform question
|
Javir | Word VBA | 4 | 09-24-2019 01:01 AM |
| How to filter data before it is pulled into combobox/listbox AND remove data from listbox | Izzii0x | Excel Programming | 8 | 05-24-2019 07:25 AM |
| Add-In creates ListBox from XLS, but data not saved in ppt | barbet | PowerPoint | 0 | 05-26-2016 02:30 AM |
| How to use an ActiveX Control to insert a multi select listbox in Word | marksm33 | Word | 2 | 01-29-2014 05:21 PM |
Multi-select listbox help
|
gvibe@hotmail.com | Word VBA | 1 | 07-19-2013 10:54 AM |