How can I use a range to define email recipients?

mwolf

New Member
Joined
Jul 17, 2009
Messages
3
Hello,

So first some background: I am using Excel 2007 and I use Outlook 2000 for email. I am automating a report that we currently do manually in anticipation of increased reporting volume. I have some VBA experience but I would still consider myself pretty novice and I've never really done anything this complex before. I have searched the internet and Excel help files for over an hour looking answers but have found none.

I have the report built and all the other functionality working how I want it. After looking at how to send emails from Excel I think I am going to just use SendKeys. The issue I am having is that I want to define the recipients of the email based on a range of cells in the report. The reason for this is that I will not be the only one using this report, so instead of "hardcoding" the recipients within the macro itself, I want to make it very easy for anyone else using this report to add or remove email addresses to a range of cells.

Any advice? Like I said I looked through help files for over an hour for some way to do this and I could not come across any examples that are even close to what I want to do.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Thanks for the link! I found an example that after doing some work on I got to do what I want.
 
Upvote 0
On more question regarding this...

For the body I want to use cell references for certain data (which is fine, I can do that) but what I can't do is bold or return to start a new line.

Right now what I'm using looks similar to this:

Code:
.Body = "Good Morning Everyone " & Worksheets("BB Summary").range("E8").Value

Obviously the body is longer, I just am showing an example. One way I got around not being able to format or start a new line with the .Body object is by using SendKeys after the email is created. However, with that I can't really use cell references which is necessary.

I've seen examples using Msg and I've tried that but I can't even get the text to show up in my email body.

I feel like there must be a simple way to do this but I just haven't been able to find it yet...
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,955
Members
449,199
Latest member
Riley Johnson

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