Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
send email to each customer email in excel sheet. | Excel Discussion (Misc queries) | |||
About using CDO to send email within Excel | Excel Discussion (Misc queries) | |||
send wkbk as an email attachment with an email address copied from | Excel Discussion (Misc queries) | |||
Excel will not let me send via email | Excel Discussion (Misc queries) | |||
body of email disappears when I send an email from Excel | Excel Discussion (Misc queries) |