7/31/2019 SendMail(Attachment)Testers
1/10
Hi Excel user
You can test a few examples in this workbook to send a workbook/sheet(s)/selection/range ia new workbook if you have a account in Outlook Express, Windows Mail, Windows Liv
Tip: See the Outlook object model code on my site if you use Outlook, you have much mor
The Examples are working in Office 2000 - 2010 and some in 97-2010
The examples on the first three worksheets on this page display the mail so you can use th
addressbook to use the address you want or enter text in the body of the mail.
See the code on my site if you know the address and want to send the mail directly.
Note: on the webpage for each example there is more information ( there is a link on each
Read also the tip page for the SendMail examples
http://www.rondebruin.nl/mail/tips1.htm
See my site for more mail code examples
http://www.rondebruin.nl/sendmail.htm
Ron de Bruin
http://www.rondebruin.nl/mail/tips1.htmhttp://www.rondebruin.nl/sendmail.htmhttp://www.rondebruin.nl/sendmail.htmhttp://www.rondebruin.nl/mail/tips1.htm7/31/2019 SendMail(Attachment)Testers
2/10
inMail orOutlook.
options then.
orksheet)
7/31/2019 SendMail(Attachment)Testers
3/10
Note: There is more information on the webpage
Mail the whole workbook With SendMail
http://www.rondebruin.nl/mail/folder1/mail1.htm
This example Send the ActiveWorkbook
It Display the mail so you can look at the result
You find the macro in Module1
This sub will send a newly created workbook (copy of the ActiveWorkbook).
It is saving the workbook with a date/time stamp.
After the file is sent the workbook will be deleted from your hard disk
It Display the mail so you can look at the result
You find the macro in Module1
http://www.rondebruin.nl/mail/folder1/mail1.htmhttp://www.rondebruin.nl/mail/folder1/mail1.htm7/31/2019 SendMail(Attachment)Testers
4/10
Note: There is more information on the webpage
Mail one Sheet With SendMail
http://www.rondebruin.nl/mail/folder1/mail2.htm
This example Send only the activesheet
It Display the mail so you can look at the result
You find the macro in Module2
Mail more then one sheet with SendMail
http://www.rondebruin.nl/mail/folder1/mail3.htm
This example Send the sheet ReadMe and the sheet MailSheet(s)
It Display the mail so you can look at the result
You find the macro in Module2
http://www.rondebruin.nl/mail/folder1/mail2.htmhttp://www.rondebruin.nl/mail/folder1/mail3.htmhttp://www.rondebruin.nl/mail/folder1/mail3.htmhttp://www.rondebruin.nl/mail/folder1/mail2.htm7/31/2019 SendMail(Attachment)Testers
5/10
Note: There is more information on the webpage
Mail Range or Selection
http://www.rondebruin.nl/mail/folder1/mail4.htm
This example Send the range Range("A1:K50") in a new workbook
It Display the mail so you can look at the result
You find the macro in Module3
This example Send the Selection in a new workbook
It Display the mail so you can look at the result
You find the macro in Module3
http://www.rondebruin.nl/mail/folder1/mail4.htmhttp://www.rondebruin.nl/mail/folder1/mail4.htm7/31/2019 SendMail(Attachment)Testers
6/10
Note: There is more information on the webpage
Mail every WorkSheet with address in A1 with SendMail
http://www.rondebruin.nl/mail/folder1/mail5.htm
Not possible to display the mail before sending if you fill in the To line with SendMail.Before you test the code add a mail address in A1 of one or more sheets.
You find the macro in Module4
http://www.rondebruin.nl/mail/folder1/mail5.htmhttp://www.rondebruin.nl/mail/folder1/mail5.htm7/31/2019 SendMail(Attachment)Testers
7/10
NameRon
Dave
TomRon
Dave
Tom
Ron
Dave
Tom
Ron
Dave
Tom
Ron
Dave
Tom
Ron
Dave
Tom
7/31/2019 SendMail(Attachment)Testers
8/10
Note: There is more information on the webpage
Mail a row or rows to each person in a range (SendMail)
http://www.rondebruin.nl/mail/folder1/row2.htm
We filter the range A17:C? for every unique name in the name column (column A in this example)For every unique name we create a new file with only the data of that person and send it to the
mail address it find with the VLookup function in the worksheet "Mailinfo".
Important : This example also use the sheet named "MailInfo"
Note: Fill in a correct mail address for each name in the name column in the sheet "MailInfo"
You find the macro in Module5
Student informationInfo about Ron 1
Info about Dave 1
Info about Tom 1Info about Ron 2
Info about Dave 2
Info about Tom 2
Info about Ron 3
Info about Dave 3
Info about Tom 3
Info about Ron 4
Info about Dave 4
Info about Tom 4
Info about Ron 5
Info about Dave 5
Info about Tom 5
Info about Ron 6
Info about Dave 6
Info about Tom 6
http://www.rondebruin.nl/mail/folder1/row2.htmhttp://www.rondebruin.nl/mail/folder1/row2.htm7/31/2019 SendMail(Attachment)Testers
9/10
Other InfoOther Info about Ron 1
Other Info about Dave 1
Other Info about Tom 1Other Info about Ron 2
Other Info about Dave 2
Other Info about Tom 2
Other Info about Ron 3
Other Info about Dave 3
Other Info about Tom 3
Other Info about Ron 4
Other Info about Dave 4
Other Info about Tom 4
Other Info about Ron 5
Other Info about Dave 5
Other Info about Tom 5
Other Info about Ron 6
Other Info about Dave 6
Other Info about Tom 6
7/31/2019 SendMail(Attachment)Testers
10/10
Name Mail address
Dave [email protected]
mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]