Skip to main content

How to send worksheet only through Outlook from Excel?

If you want to email a single worksheet out of a workbook in Excel via Outlook, you can send the worksheet as an attachment, as body content or as a PDF file. But are there any quicker ways for you to deal with this problem in Excel?

Send single worksheet as body from Excel with Send to Mail Recipient command

Send single worksheet as an attachment from Excel with VBA code

Send single worksheet as a PDF file from Excel with VBA code


arrow blue right bubble Send single worksheet as body from Excel with Send to Mail Recipient command

Excel supports us to email the active worksheet as body content by using the Send to Mail Recipient command. You can do as follows:

If you use Excel 2007, 2010 or 2013, you need to add this Send to Mail Recipient command to the Quick Access Toolbar first.

1. Click the icon of the Customize Quick Access Toolbar, and choose More Commands, see screenshot:

doc-email-sheet1

2. And in the Excel Options dialog box, choose Commands Not in the Ribbon in the Choose Commands from drop down list, then select the Send to Mail Recipient option, and click Add >> button to add this command, at last click OK to save this setting. See screenshot:

doc-email-sheet2

3. The Send to Mail Recipient command has been inserted into the Quick Access Toolbar, see screenshot:

doc-email-sheet3

4. Then click this Send to Mail Recipient icon button, and a prompt box pops out, in the E-mail prompt box, check Send the current sheet as the message body, and click OK. See screenshot:

doc-email-sheet4

5. And an email edit box is displayed above the worksheet data, you can enter your recipients, subject and introduction into the corresponding text box. See screenshot:

doc-email-sheet5

6. Then click Send this Sheet to send this active worksheet as message body to your specific person.


arrow blue right bubble Send single worksheet as an attachment from Excel with VBA code

If you would like to email the active worksheet as an attachment, the following VBA code can do a favor for you.

1. Activate your worksheet that you want to send.

2. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

3. Click Insert > Module, and paste the following code in the Module Window.

VBA code: send current worksheet as attachment from Excel

Sub SendWorkSheet()
'Update 20131209
Dim xFile As String
Dim xFormat As Long
Dim Wb As Workbook
Dim Wb2 As Workbook
Dim FilePath As String
Dim FileName As String
Dim OutlookApp As Object
Dim OutlookMail As Object
On Error Resume Next
Application.ScreenUpdating = False
Set Wb = Application.ActiveWorkbook
ActiveSheet.Copy
Set Wb2 = Application.ActiveWorkbook
Select Case Wb.FileFormat
Case xlOpenXMLWorkbook:
    xFile = ".xlsx"
    xFormat = xlOpenXMLWorkbook
Case xlOpenXMLWorkbookMacroEnabled:
    If Wb2.HasVBProject Then
        xFile = ".xlsm"
        xFormat = xlOpenXMLWorkbookMacroEnabled
    Else
        xFile = ".xlsx"
        xFormat = xlOpenXMLWorkbook
    End If
Case Excel8:
    xFile = ".xls"
    xFormat = Excel8
Case xlExcel12:
    xFile = ".xlsb"
    xFormat = xlExcel12
End Select
FilePath = Environ$("temp") & "\"
FileName = Wb.Name & Format(Now, "dd-mmm-yy h-mm-ss")
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
Wb2.SaveAs FilePath & FileName & xFile, FileFormat:=xFormat
With OutlookMail
    .To = ""
    .CC = ""
    .BCC = ""
    .Subject = "kte features"
    .Body = "Please check and read this document."
    .Attachments.Add Wb2.FullName
    .Send
End With
Wb2.Close
Kill FilePath & FileName & xFile
Set OutlookMail = Nothing
Set OutlookApp = Nothing
Application.ScreenUpdating = True
End Sub

Note: In the above code, you can change the following information to your own need.

  • .To = ""
  • .CC = ""
  • .BCC = ""
  • .Subject = "kte features"
  • .Body = "Please check and read this document."

4. Then click F5 key to run this code, and a prompt box will pop out, click Allow when the progress bar is finished, and then the current worksheet has been sent to your recipient as an attachment.

doc-email-sheet6


arrow blue right bubble Send single worksheet as a PDF file from Excel with VBA code

Sometimes, you need to send your worksheet report to others but don’t want others to modify it. In this case, you can send the worksheet as a PDF file from Excel.

1. Activate your worksheet that you want to send.

2. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

3. Click Insert > Module, and paste the following code in the Module Window.

VBA code: send current worksheet as PDF file from Excel

Sub SendWorkSheetToPDF()
'Update 20131209
Dim Wb As Workbook
Dim FileName As String
Dim OutlookApp As Object
Dim OutlookMail As Object
On Error Resume Next
Set Wb = Application.ActiveWorkbook
FileName = Wb.FullName
xIndex = VBA.InStrRev(FileName, ".")
If xIndex > 1 Then FileName = VBA.Left(FileName, xIndex - 1)
FileName = FileName & "_" + ActiveSheet.Name & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:=FileName
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
With OutlookMail
    .To = ""
    .CC = ""
    .BCC = ""
    .Subject = "kte features"
    .Body = "Please check and read this document."
    .Attachments.Add FileName
    .Send
End With
Kill FileName
Set OutlookMail = Nothing
Set OutlookApp = Nothing
End Sub

Note: In the above code, you can change the following information to your need.

  • .To = ""
  • .CC = ""
  • .BCC = ""
  • .Subject = "kte features"
  • .Body = "Please check and read this document."

4. Then press F5 key, and a prompt box will pop out, click Allow after the progress bar finising, then the active worksheet has been sent to the specific person as PDF file.

doc-email-sheet6

Notes:

1. These methods are only available when you use Outlook as your mail program.

2. After sending the current worksheet, you can go to your Outlook to make sure the email has been sent successfully.


Create Mailing List Then Send Emails

The Kutools for Excel's Create Mailing List and Send Emails utilities can quickly create mailing list in a worksheet, then send the same subject, same contents and same attachments to multiple email addresses.
doc mailing list 1
doc arrow down
doc mailing list 2

Related articles:

How to send current workbook through Outlook from Excel?

How to send / email range of cells through outlook from Excel?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

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...

Description


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!
Comments (34)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I've found the code you post for Typhaine and it works very well for me.
So thank's very much.
Philip.
This comment was minimized by the moderator on the site
Bonjour,

Est-il possible d'utiliser le code pour joindre deux feuilles du fichier Excel dans le mail ?

Merci d'avance.
This comment was minimized by the moderator on the site
Hello, Typhaine
To send multiple sheets, please apply the below code:
Note: In the code, you should change the sheet names to your own.
Sub Mail_Sheets_Array()
    Dim FileExtStr As String
    Dim FileFormatNum As Long
    Dim Sourcewb As Workbook
    Dim Destwb As Workbook
    Dim TempFilePath As String
    Dim TempFileName As String
    Dim OutApp As Object
    Dim OutMail As Object
    Dim sh As Worksheet
    Dim TheActiveWindow As Window
    Dim TempWindow As Window
    With Application
        .ScreenUpdating = False
        .EnableEvents = False
    End With
    Set Sourcewb = ActiveWorkbook
    With Sourcewb
        Set TheActiveWindow = ActiveWindow
        Set TempWindow = .NewWindow
        .Sheets(Array("Sheet1", "Sheet2")).Copy
    End With
    TempWindow.Close
    Set Destwb = ActiveWorkbook
    With Destwb
        If Val(Application.Version) < 12 Then
           
            FileExtStr = ".xls": FileFormatNum = -4143
        Else
            
            Select Case Sourcewb.FileFormat
            Case 51: FileExtStr = ".xlsx": FileFormatNum = 51
            Case 52:
                If .HasVBProject Then
                    FileExtStr = ".xlsm": FileFormatNum = 52
                Else
                    FileExtStr = ".xlsx": FileFormatNum = 51
                End If
            Case 56: FileExtStr = ".xls": FileFormatNum = 56
            Case Else: FileExtStr = ".xlsb": FileFormatNum = 50
            End Select
        End If
    End With
    TempFilePath = Environ$("temp") & "\"
    TempFileName = "Part of " & Sourcewb.Name & " " & Format(Now, "dd-mmm-yy h-mm-ss")

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    With Destwb
        .SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum
        On Error Resume Next
        With OutMail
            .To = ""
            .CC = ""
            .BCC = ""
            .Subject = "KTE features"
            .Body = "Please check and read this document"
            .Attachments.Add Destwb.FullName
           
            .Display
        End With
        On Error GoTo 0
        .Close savechanges:=False
    End With
   
    Kill TempFilePath & TempFileName & FileExtStr

    Set OutMail = Nothing
    Set OutApp = Nothing

    With Application
        .ScreenUpdating = True
        .EnableEvents = True
    End With
End Sub


Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Hej,

Muszę wysłać zakres (stały) arkusza jako obraz w treści maila jednocześnie dodając cały arkusz jako plik/załącznik. Czy jest to możliwe?
This comment was minimized by the moderator on the site
Hi the program worked just fine till 2021, I tried to run it  today, but it does send the email. As does notshow any errors
This comment was minimized by the moderator on the site
This is to inform you that i have an VBA code for send email from outlook with the help of excel vba,now i want to put "MDD Code" & " MDD Name" as well as Cells(i, 1) & Cells(i, 2) in a table like that.

MDD Code MDD Name
M123 Joydip

I am sending you the VBA Code,Request you for help.
VBA Code
----------------------------------------------------------------------------------------------------------------------------------------------
Sub sendmail()

Dim olapp As Outlook.Application

Dim olmail As Outlook.MailItem

For i = 2 To 35

Application.ScreenUpdating = False

Set olapp = New Outlook.Application

Set olmail = olapp.CreateItem(olMailItem)

With olmail

olmail.To = Cells(i, 4).Value

olmail.CC = Cells(i, 6).Value

olmail.Subject = Cells(i, 7).Value

olmail.HTMLBody = "Dear Partner ," & _

"
Please find the attchment." & _

"

MDD Code : " & Cells(i, 1) & _

"
MDD Name : " & Cells(i, 2) & _

"






Joydip Bhattacharjee" & _

"
Company" & _

"
MIS" & _

"
Country" & _

"
Contact No : 7602066491"







olmail.Attachments.Add Cells(i, 8).Value

'On Error Resume Next

'olmail.Attachments.Add Cells(i, 9).Value

'On Error Resume Next

'olmail.Attachments.Add Cells(i, 10).Value

'On Error Resume Next

'olmail.Attachments.Add Cells(i, 11).Value

'On Error Resume Next

'olmail.Attachments.Add Cells(i, 12).Value

'On Error Resume Next

'olmail.Attachments.Add Cells(i, 13).Value

'On Error Resume Next

'olmail.Attachments.Add Cells(i, 14).Value

'On Error Resume Next

olmail.Send

End With

Set olmail = Nothing

Next

End Sub
This comment was minimized by the moderator on the site
merhaba ben bunu belirli periyotta otomatik mail atmasını nasıl ayarlayabilirim
This comment was minimized by the moderator on the site
Excelent code. Thanks!
This comment was minimized by the moderator on the site
Anyway I can easily send an excel worksheet through my outlook without all this ?? I can send the worksheet context, but no the workbook as an attachment. On my work computer I can send from word and excel, but am having trouble at home.
This comment was minimized by the moderator on the site
Hi! Is it possible to use this code, but instead of sending straight away it opens up the mail?
This comment was minimized by the moderator on the site
You can try this code:
Sub SendWorkSheet()
'Update 20180109
Dim xFile As String
Dim xFormat As Long
Dim Wb As Workbook
Dim Wb2 As Workbook
Dim FilePath As String
Dim FileName As String
Dim OutlookApp As Object
Dim OutlookMail As Object
On Error Resume Next
Application.ScreenUpdating = False
Set Wb = Application.ActiveWorkbook
ActiveSheet.Copy
Set Wb2 = Application.ActiveWorkbook
Select Case Wb.FileFormat
Case xlOpenXMLWorkbook:
xFile = ".xlsx"
xFormat = xlOpenXMLWorkbook
Case xlOpenXMLWorkbookMacroEnabled:
If Wb2.HasVBProject Then
xFile = ".xlsm"
xFormat = xlOpenXMLWorkbookMacroEnabled
Else
xFile = ".xlsx"
xFormat = xlOpenXMLWorkbook
End If
Case Excel8:
xFile = ".xls"
xFormat = Excel8
Case xlExcel12:
xFile = ".xlsb"
xFormat = xlExcel12
End Select
FilePath = Environ$("temp") & "\"
FileName = Wb.Name & Format(Now, "dd-mmm-yy h-mm-ss")
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
Wb2.SaveAs FilePath & FileName & xFile, FileFormat:=xFormat
With OutlookMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "kte features"
.Body = "Please check and read this document."
.Attachments.Add Wb2.FullName
.Display
' .Send
End With
Wb2.Close
Kill FilePath & FileName & xFile
Set OutlookMail = Nothing
Set OutlookApp = Nothing
Application.ScreenUpdating = True
End Sub

Please let me know if it works for you, thank you.
This comment was minimized by the moderator on the site
This code works good, however, does anyone know a way to automate a field as an alert for the email to go automatically based on a date column?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations