0% found this document useful (0 votes)
72 views15 pages

Hi Excel User: Note: Not Outlook Express or Windows Mail

The document provides examples of VBA code to send worksheets, ranges, selections, and other content from an Excel workbook to email using Outlook. It explains how to modify the code to either display the email for review or directly send it. Links are provided to additional resources on the author's website with more details on each code example and tips for using Outlook with Excel. The examples are intended to work with Office versions 2000 through 2010.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views15 pages

Hi Excel User: Note: Not Outlook Express or Windows Mail

The document provides examples of VBA code to send worksheets, ranges, selections, and other content from an Excel workbook to email using Outlook. It explains how to modify the code to either display the email for review or directly send it. Links are provided to additional resources on the author's website with more details on each code example and tips for using Outlook with Excel. The examples are intended to work with Office versions 2000 through 2010.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
You are on page 1/ 15

Hi Excel user

You can test a few examples In this workbook to send a workbook/sheet(s)/selection/range in


a new workbook if you have a account in Outlook.

Note : Not Outlook Express or Windows Mail


See the other code on my site if you use Outlook Express or Windows Mail.

The Examples are working in Office 2000 - 2010

The examples in this workbook display the mail so you can use the
addressbook to use the address you want or enter more text in the body of the mail.
Change .Display to .Send in the code if you know the address and want to send the mail directly.

See this page about security warnings if you do that.


http://www.rondebruin.nl/mail/prevent.htm

Note: on the webpage for each example there is more information ( there is a link on each worksheet)
Read also the tip page for the Outlook examples
http://www.rondebruin.nl/mail/tips2.htm

See my site for more mail code examples


http://www.rondebruin.nl/sendmail.htm

Ron de Bruin
ection/range in

nd the mail directly.

ink on each worksheet)


Note: There is more information on the webpage

Mail worksheet in the body


http://www.rondebruin.nl/mail/folder3/mail2.htm

This example Send the whole sheet in the body of the mail
I use .Display in the code so you can look at the result
You find the macro in Module1 and the function in the module FunctionModule
Note: There is more information on the webpage

Mail Range or Selection in the body


http://www.rondebruin.nl/mail/folder3/mail4.htm

This example Send the selection in the body of the mail.

I use .Display in the code so you can look at the result.


You find the macro in Module2 and the function in the module FunctionModule
Select the cells first before you run the macro

This example Send the range("B19:B24") in the body of the mail.

I use .Display in the code so you can look at the result.


You find the macro in Module2 and the function in the module FunctionModule

Note: if you want to send also a picture in the body of the mail see this page

Mail selection, range or worksheet in the body of a mail with MailEnvelope


http://www.rondebruin.nl/mail/folder3/mailenvelope.htm
Note: There is more information on the webpage

Mail a small message


http://www.rondebruin.nl/mail/folder3/smallmessage.htm

This example Send a small plain text message in the body of the mail.
I use .Display in the code so you can look at the result.
You find the macro in Module3

This example send the text from a txt file in the body of the mail
I use .Display in the code so you can look at the result.
You find the macro in Module3 and the function in the module FunctionModule
Be sure that the txt file in the download is in the same folder then this example workbook
Name Address Yes/No

Ron ron@test.nl yes

Tom tom@test.nl no
Dave dave@test.nl yes
Cordialmente,

Mario ErnestoCañas Rodas. CPA & Coach


Gerente de Auditoría Financiera
Dirección de Auditoría Interna (DAI)
Tel. 2537-2226, cel. 7706-5614

"Todo camino del hombre es recto en su propia opinión;


Pero Jehová pesa los corazones"  Proverbios 21:2
ron@test.nl
Note: There is more information on the webpage

Mail every worksheet with address in A1 in the body


http://www.rondebruin.nl/mail/folder3/mail5.htm

This procedure will mail every Worksheet with an address in cell A1.
It does this by cycling through each worksheet in the workbook and checking cell A1 for the @ character.
If found it will create a mail and send it to the address in cell A1.

You see that in this workbook only this sheet have a address in A1.
I use .Display in the mail so you can look at the result
You find the macro in Module4
Name Address Yes/No Jan Feb Mar Apr May
Ron ron@test.nl yes 8 6 4.8 9
Tom tom@test.nl no 8 6 4.8 9
Dave dave@test.nl yes 7 5.6 9 7.5

Note: There is more information on the webpage

Mail a row to each person in a range (HTML)


http://www.rondebruin.nl/mail/folder3/row.htm

This example each row to the student with the grades in the body of the mail
because the value in column C = "yes"
I use .Display in the code so you can look at the result.
This example will loop through row 1 -100
You find the macro in Module6 and the function in the module FunctionModule
Jun Jul Aug Sep Oct Nov Dec

rades in the body of the mail

e result.

in the module FunctionModule


Name
Ron
Dave
Tom
Ron
Dave
Tom
Ron
Dave
Tom
Ron
Dave
Tom
Ron
Dave
Tom
Ron
Dave
Tom
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 Module7 and the function in the module FunctionModule

Student information
Info about Ron 1
Info about Dave 1
Info about Tom 1
Info 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
Other Info
Other Info about Ron 1
Other Info about Dave 1
Other Info about Tom 1
Other 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
Name Mail address
Ron ron@test.nl
Dave dave@test.nl
Tom tom@test.nl

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy