View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ivan Raiminius Ivan Raiminius is offline
external usenet poster
 
Posts: 258
Default Help: XL & Outlook

Hi,

Sub SendAnEmailWithOutlook(CurrFile)

Dim olApp As Outlook.Application
Dim olMail As MailItem

Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)

With olMail
.To = "
.CC = "
.Subject = "Textron Schedule Agreements: " & Right(CurrFile, 13)
.Attachments.Add CurrFile & ".xls"
.Display
.OriginatorDeliveryReportRequested = True
.ReadReceiptRequested = True
..send 'added to send the mail
if .sent then
msgbox "Sent"
else
msgbox "Not sent"
end if
End With

Set olMail = Nothing
Set olApp = Nothing
End Sub

But I cannot see in the code you are sending it. (you need to add
".send").

Regards,
Ivan