Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this example
Sub Mail_ActiveSheet_Outlook() Dim OutApp As Object Dim OutMail As Object Dim wb As Workbook Dim strdate As String strdate = Format(Now, "dd-mm-yy h-mm-ss") Application.ScreenUpdating = False ActiveSheet.Copy Set wb = ActiveWorkbook With wb .SaveAs "Part of " & ThisWorkbook.Name _ & " " & strdate, FileFormat:=xlHtml Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) With OutMail .To = " .CC = "" .BCC = "" .Subject = "This is the Subject line" .Body = "Hi there" .Attachments.Add wb.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .display 'or use .Display End With .ChangeFileAccess xlReadOnly Kill .FullName .Close False End With Application.ScreenUpdating = True Set OutMail = Nothing Set OutApp = Nothing End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "argi" wrote in message ... Please give an example. -- argi ------------------------------------------------------------------------ argi's Profile: http://www.excelforum.com/member.php...o&userid=24329 View this thread: http://www.excelforum.com/showthread...hreadid=379309 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I e-mail one Excel sheet to arrive NOT in HTML | Excel Discussion (Misc queries) | |||
Pasting HTML into a single cell | Excel Discussion (Misc queries) | |||
Save single sheet from XLS file as HTML | Excel Discussion (Misc queries) | |||
Mail a singel sheet i an xls file. | Excel Discussion (Misc queries) | |||
Can you save a single sheet directly to a new file | Excel Worksheet Functions |