Discussion Locked

Excel Tip - USE VBA TO E-MAIL YOUR WORKB

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

This is an excellent Tip that you passed on to your readers. I have been
using this strategy and it works well.

My question, any way to place text in the body of the email, in addition to
the subject text?

USE VBA TO E-MAIL YOUR WORKBOOKIt's very easy to send a workbook using Excel VBA code. The workbook is
sent using your default mail program. Simply use the SendMail method as
shown in the sample procedure below.

Sub SendTheWorkbook()
ActiveWorkbook.SendMail _
Recipients:="you@youraddress.com", _
Subject:="Here is the workbook--", _
ReturnReceipt:=False
End Sub

Thanks,
Rick

3 replies

by dklippert

I wish Excel had the ability to send a message, but I don't think it does.

The Excel VBA function is:
SendMail(Recipients, Subject, ReturnReceipt).

You can, howver, do it in Access with a similar function:
DoCmd.SendObject [objecttype][, objectname][, outputformat][, to][, cc][, bcc][, subject][, messagetext][, editmessage][, templatefile].

by rvs

Appreciate the info on access. Unfortunately, almost all my work is with excel.

Thanks

This discussion is closed to new replies.