Name

workbook.SendMail(Recipients, [Subject], [ReturnReceipt])

Synopsis

Sends a workbook via email as an attachment.

Argument

Settings

Recipients

The email names or aliases of the recipients.

Subject

A subject line to include with the email.

ReturnReceipt

True notifies the sender when the recipient receives the mail; False does not (default).

The following line sends the current workbook as an email:

ThisWorkbook.SendMail "ExcelDemo@Hotmail.com", "Workbook samples"

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.