using VBA to send an excel worksheet to a list of people

jeepjenn

New Member
Joined
Aug 23, 2010
Messages
13
Hello!

I am trying to adapt the following code (at the link because im not sure how to post code) so that I can send each worksheet to a different e-mail address.
I want it to create a new workbook, insert the worksheet and send the e-mail.
I am using Windows 7, Groupwise 12 and Excel 2010.
I have played with it for about a week, and haven't had any success...

Any suggestions would be welcome!

I have been trying to follow what is at Ron's page here...Sending mail from Excel with CDO, but its way beyond my beginners capabilities...
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I use the same CDO code to send email from Excel. Just follow the example in the link and replace the commented lines with the following, which is the actual code I use to send email from Excel, except the user name and password. It sends email from my gmail account. You need to customize the items in blue to suit your situation. Send a plain text test message to see if it works for you.

Code:
iConf.Load -1    ' CDO Source Defaults
    Set Flds = iConf.Fields
    With Flds
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
        .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[COLOR=#0000cd]mygmailid@gmail.com[/COLOR]"
        .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "[COLOR=#0000cd]mygmailpassword[/COLOR]"
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "[COLOR=#0000cd]smtp.googlemail.com[/COLOR]"


        .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = [COLOR=#0000cd]465[/COLOR]
        .Update
    End With
 
Last edited:
Upvote 0
I have a similiar situation I need help with... I have various claculations and dates on a excell schedule but would like to set up that if a certain cell in actual in excel has a negative value that it sends an email to a specific address and also maybe if the dates on the schedule can be used to send email reminders email adresses.

Your input will be greatly appreciated.
 
Upvote 0
I have a similiar situation I need help with... I have various claculations and dates on a excell schedule but would like to set up that if a certain cell in actual in excel has a negative value that it sends an email to a specific address and also maybe if the dates on the schedule can be used to send email reminders email adresses.

Your input will be greatly appreciated.
Please follow the link in the OP's article so you know how to send email from Excel. Once that is done, what you want to do is quite simple.
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,397
Members
449,081
Latest member
JAMES KECULAH

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