Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Send Email from Excel

lehainam wrote:
Dear all,

I have a macro to mail many sheets as belows:

Sub Mail_every_Worksheet()

'Mail every Worksheet with address in cell B4 using VBA in Microsoft
Excel

'Dim strDate As String
Dim sh As Worksheet
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
If sh.Range("B4").Value Like "*@*" And sh.Name < "Form" Then
sh.Copy
'strDate = Format(Date, "dd-mm-yy") & " " & Format(Time,
"h-mm-ss")
ActiveWorkbook.SaveAs sh.Name & ".xls"
ActiveWorkbook.SendMail ActiveSheet.Range("B4").Value, _
ActiveSheet.Name
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End If
Next sh
Application.ScreenUpdating = True
End Sub

However, I don't know how to put the content of this email, for ex.
"This is the salary of Jun 05".

Could any one can help me to add the content to my email.

Thanks a lot!

Nam


There's another thread that might help:
http://groups-beta.google.com/group/...21d1eb90af0f1/


Iain

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
send email to each customer email in excel sheet. -keevill- Excel Discussion (Misc queries) 3 July 17th 08 02:33 PM
About using CDO to send email within Excel [email protected] Excel Discussion (Misc queries) 1 June 7th 07 03:02 PM
send wkbk as an email attachment with an email address copied from SueInAtl Excel Discussion (Misc queries) 0 May 21st 07 10:53 PM
Excel will not let me send via email Johnfli Excel Discussion (Misc queries) 1 February 25th 06 03:09 AM
body of email disappears when I send an email from Excel ~A Excel Discussion (Misc queries) 0 February 25th 05 10:55 PM


All times are GMT +1. The time now is 04:09 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"