1
I’m trying to use the "For Each" to generate multiple PDF’s, such as a Word Direct Mail. My idea is to select several names from Listbox and generate Pdfs with selected items. My code is like this:
Dim listarNomes As String = ListBox1.GetItemText(ListBox1.SelectedItem)
Dim data As String() = {listarNomes}
For i As Integer = 0 To data.Length - 1
doc.NewPage()
doc.Add(gif)
doc.Add(New Paragraph(" "))
doc.Add(New Paragraph(data(i), fonte1))
Next
Even when I select several names from Listbox, only generates a page with only one name. My Listbox uses Data Association Entries.