Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Mail_workbook_KI()
Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dayrep = InputBox("Enter no. day of report.", Default:="0") Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = " .CC = "" .BCC = "" .Subject = Dayrep & "Day Revenue Report" .Body = "'Please find attached the ' & dayrep & ' day report '" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Send 'or use .Display End With Set OutMail = Nothing Set OutApp = Nothing End Sub Having problem with the body message - want it to read: 'Please find attached the 10 day report - if Dayrep=10 Can anybody help pls |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
send email to each customer email in excel sheet. | Excel Discussion (Misc queries) | |||
send wkbk as an email attachment with an email address copied from | Excel Discussion (Misc queries) | |||
send email with email addresses in a range of cells | Excel Programming | |||
send email in VBA | Excel Programming | |||
body of email disappears when I send an email from Excel | Excel Discussion (Misc queries) |