#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default E-mailing

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to import my Excel Mailing list into mailing label format. Gord Dibben Excel Discussion (Misc queries) 0 November 5th 09 10:16 PM
I need to import my Excel Mailing list into mailing label format. Lyn Excel Discussion (Misc queries) 0 November 5th 09 08:11 PM
mailing ceemo[_45_] Excel Programming 0 November 2nd 05 08:06 AM
mailing ceemo[_46_] Excel Programming 0 November 2nd 05 08:06 AM
how do i convert MS Word mailing labels into an Excel mailing lis. unrhyll Excel Discussion (Misc queries) 1 February 4th 05 12:19 AM


All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"