Send multiple attachment using a list box - WeOnlyDo Discussion board

Send multiple attachment using a list box (General questions)

by Nightwalker, Wednesday, August 04, 2010, 15:11 (5224 days ago)

Hi,

I have been using a list box to hold the filenames of the files I am sending via email. I was able to loop through the box and send each file using the visual basic mapi components. However, since, I have been using WOD I have read that I can only use:

wodSmtp1.Message.Attach c:file1.exe
wodSmtp1.Message.Attach c:file2.exe

Could I use the listbox method with the above code? If so how?

Thanks,


Nightwalker

Re: Send multiple attachment using a list box

by wodDamir, Wednesday, August 04, 2010, 15:25 (5224 days ago) @ Nightwalker

Hi,

If you have filenames in a listbox, then i don't see a problem. Why not simply loop thru each listbox item, and use attach method on it?

I.e:

For i=0 to listbox.count
wodSmtp1.Message.Attach listbox(i)
Next i

The code shown isn't an actual, but rather a concept, but I assume it shows what I mean.

Regards,
Damba