Forum Discussion
Mailing excel sheets automatically to different recievers
- Aug 14, 2018
If you want to send email involve Info.cells(i+1,9), Info.cells(i+1,10) and Info.cells(i+1,11), you may use "&" to concatenate the strings.
.body = Info.cells(i+1,9) & chr(10) & Info.cells(i+1,10) & chr(10) & Info.cells(i+1,11)
"chr(10)" represents the line break after the content of Info.cells(i+1,9) (example).
I changed the code like below but I am still need to apply for cells(i + 1, 10) and cells(i + 1, 11) in .body part. How can I do this you have any idea?
For i = 1 To n_Staff
Set OA = CreateObject("Outlook.Application")
Set OM = OA.CreateItem(0)
With OM
.To = Info.Cells(i + 1, 7)
.Subject = Info.Range("M2")
.body = Info.Cells(i + 1, 9)
If you want to send email involve Info.cells(i+1,9), Info.cells(i+1,10) and Info.cells(i+1,11), you may use "&" to concatenate the strings.
.body = Info.cells(i+1,9) & chr(10) & Info.cells(i+1,10) & chr(10) & Info.cells(i+1,11)
"chr(10)" represents the line break after the content of Info.cells(i+1,9) (example).
- Anıl AdaşAug 14, 2018Brass Contributor
I was failed because I didn't use chr(10).
Thanks a lot..