Email Excel spreadsheet to multiple recipients

gooniegirl180

Board Regular
Joined
Aug 13, 2003
Messages
152
Hi all,

I need a short piece of code which takes our open, current macro-enabled workbook and emails it to three different email receipients.

All the research I've done so far has only resulted in either code which allows the email to go to a single recipient, or code which is so long and involved and checks versions etc etc which doesn't apply to what we need the file to do (it doesn't matter once it's emailed if the VBA code doesn't work anymore). We want to hard-code the email addresses into the macro (yes, I know it's not good practice, but I'm teaching a rookie - HA! Blind leading the blind - and want to keep it simple).

We've put in this code:
ActiveWorkbook.SendMail "recipient1", "Subject"
ActiveWorkbook.SendMail "recipient2", "Subject"
ActiveWorkbook.SendMail "recipient3", "Subject"

but we keep getting asked by Outlook if we want to Allow, Deny or Get Help for each user. We just want the file to send and don't want to be asked this!

So, two questions: How do we send to multiple recipients, and how do we prevent the Outlook confirmation from coming up?

Thanks & Regards,
gooniegirl180
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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