VBA Email Files

Zibi

Board Regular
Joined
Feb 2, 2012
Messages
73
Hello,
Please help, I need vba to email using outlook 2013 specific files to group of people with subject and Message, all information would be on spreadsheet in the row, the code should stop when last row is empty

column a and b has to: email
column c, d, e and f has CC: emil
column g has file name
column h has file location
column I has message that should be included with the email
column J has subject of the email

Please help

to: to: cc: cc: cc: cc:
email address email address email address email address email address email address File Name File Location Message Subject
John@cast.net Andy@cast.net BOB@cast.net Dan@cast.net jj@cast.net BB@cast.net New C:/EmailFile Email to you Hello
John@cast.net Andy@cast.net BOB@cast.net Dan@cast.net jj@cast.net BB@cast.net Old C:/EmailFile Email to US Call me
BB@cast.net Andy@cast.net File1 C:/EmailFile Email to KR Best
 
Great, that worked very nice thank you, can you also show me how can I change the email ".to = cell.Value" to use columns B and C?

again thank you very much
Zibi
 
Upvote 0
Change
Rich (BB code):
With OutMail
.to = cell.Value
.Subject = "Testfile"
.Body = "Hi " & cell.Offset(0, -1).Value

TO

Rich (BB code):
With OutMail
.to = cell.Value & ";" & cell.Offset(0, 1).Value
.Subject = "Testfile"
.Body = "Hi " & cell.Offset(0, -1).Value
 
Last edited:
Upvote 0

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