Thread: E-mailing
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default E-mailing

You didn't tell it to put the msg in the body. See Ron's site:

http://www.rondebruin.nl/sendmail.htm

"CV323" wrote:

Below is my code. Everything works fine except that the e-mail message does
not show up in the body of the e-mail. Why?


'EMAIL ALTIMONTE
Application.DisplayAlerts = False
If OptionAltimonte = True And OptionEmail = True Then
Workbooks.Open ( _
"W:\compensa\2007 Reports\Master Turnover.xls") _
, UpdateLinks:=0
Dim OutApp As Object
Dim OutMail As Object
strbody As String
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
ActiveWorkbook.SendMail ", Subject:="May
Turnover Report", ReturnReceipt:=True
'===========================
'THIS SHOULD BE THE BODY OF THE EMAIL MESSAGE
Msg = "Hi there" & vbNewLine & vbNewLine & _
Msg = Msg & "Attached is the May Turnover Report"

Windows("Master Turnover.xls").Close savechanges = False
Application.DisplayAlerts = True
End If