How to send email from a specified range of cells in Excel?
In many cases, a specified range of contents in Excel worksheet may be useful in your email communication. In this article, we will introduce a method of sending an email with specified range into email body directly in Excel.
Send email from a specified range of cells in Excel
Send email from a specified range of cells with an amazing tool
More tutorials for mailing in Excel...
Send email from a specified range of cells in Excel
The following VBA code can help you to copy a range and paste it into an Outlook email body directly in Excel. Please do as follows.
1. In the worksheet contains the range you need to copy, press the "Alt + F11" keys simultaneously to open the "Microsoft Visual Basic for Applications" window.
2. In the opening "Microsoft Visual Basic for Applications" window, please click "Tools" > "References" as below screenshot shown.
3. In the "References – VBAProject" dialog box, please find and check the "Microsoft Outlook Object Library" option, and then click the OK button.
4. Click "Insert" > "Module", then copy and paste the below VBA code into the Module window.
VBA code: Send email with a specified range in Excel
Sub Send_Email()
'Updated by Extendoffice 20200119
Dim xRg As Range
Dim I, J As Long
Dim xAddress As String
Dim xEmailBody As String
Dim xMailOut As Outlook.MailItem
Dim xOutApp As Outlook.Application
On Error Resume Next
xAddress = ActiveWindow.RangeSelection.Address
Set xRg = Application.InputBox("Please select range you need to paste into email body", "KuTools For Excel", xAddress, , , , , 8)
If xRg Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Set xOutApp = CreateObject("Outlook.Application")
Set xMailOut = xOutApp.CreateItem(olMailItem)
For I = 1 To xRg.Rows.Count
For J = 1 To xRg.Columns.Count
xEmailBody = xEmailBody & " " & xRg.Cells(I, J).value
Next
xEmailBody = xEmailBody & vbNewLine
Next
xEmailBody = "Hi" & vbLf & vbLf & " body of message you want to add" & vbLf & vbLf & xEmailBody & vbNewLine
With xMailOut
.Subject = "Test"
.To = "happy.xuebi@163.com"
.Body = xEmailBody
.Display
'.Send
End With
Set xMailOut = Nothing
Set xOutApp = Nothing
Application.ScreenUpdating = True
End Sub
Notes:
- 1). Please change the email body in this script line
xEmailBody = "Hi" & vbLf & vbLf & " body of message you want to add" & vbLf & vbLf & xEmailBody & vbNewLine as you need. - 2). Please specify your email recipient and subject in this line within the code:
(.To = happy.xuebi@163.com and .Subject = "test").
5. Press the F5 key to run the code. In the popping up Kutools for Excel dialog box, please select the range you need to paste in the email body, and then click the OK button. See screenshot:
6. Now an email is created with specified recipient, subject, body and selected Excel range, please click the "Send" button to send this email. See screenshot shown.
Note: The VBA code is only working when you use Outlook as your email program.
Send email from a specified range of cells with an amazing tool
If you don’t use Outlook and still want to send emails directly in Excel with a specified range data pasted inside, I highly recommend Kutools for Excel's "Send Email" feature for you. With this feature, you just need to configure the outgoing server of an email address, and then send emails in Excel directly via this email address in the future.
1. Firstly, you need to prepare a mailing list with needed fields.
- Tips: The mailing list must contain at least 2 rows, and the first row must be the headers (Supposing you want to send emails to two email addresses in Excel, please type in these two email addresses with header “Email” as the below screenshot shown).
- Alternatively, you can easily create a mailing list with the Create Mailing List feature.
2. Select the range you will add the data to the email body and press the Ctrl + C keys to copy it.
3. Select the whole mailing list (include headers), click "Kutools Plus" > "Send Emails". See screenshot:
4. Then the "Send Emails" dialog box pops up.
- 4.1) Items of selected mailing list are populated in corresponding fields (you can add more fields to the mailing list as you need);
- 4.2) Click on the email body box, press the Ctrl + V keys to paste the selected range data into it. After that, add other content as you need;
- 4.3) Uncheck the "Send emails via Outlook" box;
- 4.4) Click the "Outgoing Server Settings" button. See screenshot:
5. Then the "Outgoing Server (SMTP) Settings – New Scheme" dialog box pops up. Please fill in the email address with its server settings, specify a folder to save all sent mails after checking the "Save sent emails to" box, and then click the OK button to save the settings.
6. When it returns to the "Send Emails" dialog box, click the "Send" button to send the email.
Kutools for Excel - Packed with over 300 essential tools for Excel. Enjoy permanently free AI features! Download now!
Related articles:
Send email to email addresses specified in cells in Excel
Supposing you have a list of email addresses, and you want to send email message to these email addresses in bulk directly in Excel. How to achieve it? This article will show you methods of sending email to multiple email addresses which specified in cells in Excel.
Insert Outlook signature when sending email in Excel
Supposing you want to send an email directly in Excel, how can you add the default Outlook signature in thie email? This article provides two methods to help you adding Outlook signature when sending email in Excel.
Send email with multiple attachments attached in Excel
This article is talking about sending an email through Outlook with multiple attachments attached in Excel.
Send email if due date has been met in Excel
For example, if the due date in column C is less than or equal to 7 days (current date is 2017/9/13), then send an email reminder to the specified recipient in column A with specified content in column B. How to achieve it? This article will provide a VBA method to deal with it in details.
Automatically send email based on cell value in Excel
Supposing you want to send an email through Outlook to a certain recipient based on a specified cell value in Excel. For example, when the value of cell D7 in a worksheet is greater than 200, then an email is created automatically. This article introduces a VBA method for you to quickly solve this issue.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.





- All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license — set up in minutes (MSI-ready)
- Works better together — streamlined productivity across Office apps
- 30-day full-featured trial — no registration, no credit card
- Best value — save vs buying individual add-in