Code:Sub Mail_Active_Sheet() Application.DisplayAlerts = False 'path, name and extension for tempfile - change to suit c00 = "G:\My documents\TempFile." & CreateObject("scripting.filesystemobject").getextensionname(ThisWorkbook.Name) c01 = ThisWorkbook.FileFormat 'Copy active sheet ThisWorkbook.ActiveSheet.Copy 'Save attachment With ActiveWorkbook .SaveAs c00, c01 .Close False End With 'Create mail With CreateObject("Outlook.Application").createitem(0) .to = ActiveSheet.Range("E9") .Subject = ActiveSheet.Range("B2") .attachments.Add c00 .display '.Send End With 'Delete tempfile Kill c00 Application.DisplayAlerts = True End Sub




Reply With Quote
Bookmarks