Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
emailing a workbook from within excel
I have tried using both of the following methods, to send an email from
within a workbook, both have failed. The purpose for this is to notify a manager that a report is to be looked at. I hope that someone can help. Cheers D Sub Mail_workbook_Outlook() 'This example send the last saved version of the Activeworkbook Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) With OutMail .To = cboxProjectDirector.Value & " .CC = "" .BCC = "" .Subject = cboxProjectList.Value & " Status Report" & Format(Date, "dd/mmm/yy") & ".xls" .Body = "Hi there" .Attachments.Add ActiveWorkbook.FullName .Send End With Set OutMail = Nothing Set OutApp = Nothing End Sub Private Sub MailWorkbook() ThisWorkbook.SendMail (cboxProjectDirector.Value & & " Status Report" & Format(Date, "dd/mmm/yy")) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving / emailing sinlge excel sheet, not entire workbook | Excel Discussion (Misc queries) | |||
Emailing Workbook | Excel Discussion (Misc queries) | |||
Emailing an Excel Workbook with Links | Links and Linking in Excel | |||
Emailing an Excel Workbook with Links | Excel Discussion (Misc queries) | |||
Emailing a workbook | Excel Discussion (Misc queries) |