Send email

A

al007

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 = "(e-mail address removed)"
.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
 
G

Gary Keramidas

that's fine, i would just like to send an email to 4 or 5 users with a subject
line and nothing else, not even any body content.
 
G

Gary Keramidas

hi ron:

think i got what i need from example 2, thanks.

ps i took your email address out<g>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top