Need some VB guru's help...how to send multiple emails

L

Legacy 55058

Guest
I am looking to send multiple emails to different users from excel, and to email a different range in each separate email. I am not looking to send as an attachment, just within the body of the email. I have played with some code but only could get one email to go out, not multiple :eek:
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hello,

Well, hopefully you've seen this using Outlook:

http://www.mrexcel.com/board2/viewtopic.php?t=54018

Now, what you want to do is iterate, like looping through an array, e.g.,

http://www.mrexcel.com/board2/viewtopic.php?p=536376#536376

Now note, that's Lotus Note's Code, so if you're using Outlook, you don't want any of that LotusScript, etc... but you want the concept of iterating through an array, so focus on these code bits:

Code:
Let emailArr = Array("Email1@y.com", "Email2@y.com", "Email3@y.com", "Email4@y.com", _
    "Email5@y.com", "Email6@y.com", "Email7@y.com")


For i = LBound(myArr) To UBound(myArr)

    MailDoc.SendTo = emailArr(i)
Clear as mud? :)
 
Upvote 0
That is fantastic......I am just starting to get into VBA, and learning the whole looping functionality. This is great. Thanks!!! :biggrin:
 
Upvote 0
You are welcome.

Yep, Excel's pretty slick software, offering some really choice native functionality. And, the bonus is the ability to augment native functionality and interface other Apps via VBA, a powerful, hi-level language.

Good hunting and happy new year. :)
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,166
Members
448,870
Latest member
max_pedreira

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top