There I have bool that add files to ListBox:
If sp.ShowDialog() = DialogResult.OK Then
For Each wp In sp.FileNames
ListBox1.Items.Add(wp)
Next wp
End If
and bool that add files to e-mail:
If ListBox1.Items.Count <> 0 Then
For Each file In ListBox1.Items
attch = New System.Net.Mail.Attachment(file)
message.Attachments.Add(attch)
Next file
End If
Is it possible to show only file names in ListBox but it will contains path to use it in second bool?
Because when I use sp.SafeFileNames it couldn't be sent because I don't have path.