REAL-TIME

VBA Projects

Full Access with Source Code
  • Designed and Developed by PNRao

  • Full Access with VBA Source Code

  • Well Commented Codes Lines

  • Creative and Professional Design

Effortlessly
Manage Your Projects

120+ Project Management Templates

Seamlessly manage your projects with our powerful & multi-purpose templates for project management.

120+ PM Templates Includes:
  • 50+ Excel Templates

  • 50+ PowerPoint Templates

  • 25+ Word Templates

Share Post

SendMail Workbook method is used to sends the workbook via an email as an attachment by using the installed mail system.

VBA SendMail Method Excel Workbook Object

When we use SendMail Workbook Method in VBA?

We use SendMail workbook method when we wanted to send an email to the specified recipients and workbook as an attachment. We can also send particular worksheet as workbook.

VBA SendMail Workbook Method- Syntax

Here is the syntax of SendMail workbook method in VBA.

Workbooks(“Your Workbook Name”).SendMail(Recipients,

[Subject], [ReturnReceipt])

Where,
Recipients: It is required parameter. It specifies the name of the recipient(s) and added as To recipients.
Subject: It is an Optional parameter. It specifies the subject of the message. If you don’t specify any name, Default name is document name.
ReturnReceipt: It is an Optional parameter. Default value is False. If it is True notifies the sender when recipient receives an email.

VBA SendMail Workbook Method: Example 1

Please find the below example, it will show you how to send an email using SendMail workbook method using VBA.

Sub End_Email()
    ThisWorkbook.SendMail "info@analysistabs.com", "Sample Workbook"
End Sub

Explanation:In the above example it will send the activeworkbook as an attachment to info@analysistabs.com and subject is ‘Sample Workbook’.

VBA SendMail Workbook Method: Example 2

Please find the one more example, it will send one worksheet from a workbook.

Sub Send_Worksheet()
    ThisWorkbook.Sheets(“Sheet1”).Copy
    With ActiveWorkbook
         .SendMail Recipients:="info@analysistabs.com", Subject:="Sample Workbook"
         .Close SaveChanges:=False
    End With
End Sub

Explanation: It will create a new workbook with which we are copying worksheet and send as an attachment. And then finally it closes the new workbook which we created without saving.

VBA SendMail Workbook Method – Instructions

Please follow the below step by step instructions to execute the above mentioned VBA macros or codes:

  1. Open an Excel Workbook
  2. Press Alt+F11 to Open VBA Editor
  3. Insert a Module from Insert Menu
  4. Copy the above code for activating a range and Paste in the code window(VBA Editor)
  5. Save the file as macro enabled workbook
  6. Press ‘F5’ to run it or Keep Pressing ‘F8’ to debug the code line by line.
Effortlessly Manage Your Projects and Resources
120+ Professional Project Management Templates!

A Powerful & Multi-purpose Templates for project management. Now seamlessly manage your projects, tasks, meetings, presentations, teams, customers, stakeholders and time. This page describes all the amazing new features and options that come with our premium templates.

Save Up to 85% LIMITED TIME OFFER
Project Management Templates

All-in-One Pack
120+ Project Management Templates

Essential Pack
50+ PM Templates

Excel Pack
50+ Excel PM Templates

PowerPoint Pack
50+ Excel PM Templates

MS Word Pack
25+ Word PM Templates

Ultimate Project
Management Template
Ultimate Resource
Management Template
Project Portfolio
Management Templates
Last Updated: March 2, 2023

2 Comments

  1. VBA User October 30, 2018 at 2:54 PM

    I really appreciate this blog post. You have very well explained the above instructions on VBA Send Mail Workbook. I have followed your all the instructions and easily resolved it.

  2. Irene April 29, 2020 at 3:22 PM

    Hi, how do I use this for two or more recipients? Thanks

Leave A Comment