Useful Hacks, Reviews, Tips and Tricks of anything under the moon and the sun.

Send emails from within Excel

1 comment
9:50AM Today, an important email from a VIP arrived on my mailbox. The email goes like this:

Hi foxtrot. Can you please take a look on the attached excel workbook. I want my secretary to be able to send this workbook from within excel.

Fortunately for me, Excel VBA can send emails from within Excel and even send the Workbook as an attachment. How?

1. Open your excel workbook.
2. Click Tools > Macro > Visual Basic Editor.
3. From the left pane, click ThisWorkbook and paste the following code on the blank white space on the right pane.

Sub SendActiveWorkbook()

ActiveWorkbook.SendMail _
Recipients:="", _
Subject:="You Workbook " & Format(Date, "dd/mmm/yy")

End Sub

Send emails from within Excel

To customize it, replace the following:
Recipients - to your recipient email
Subject - the subject you want to appear on your email

1 comment :