Help with e-mail macro

  • Thread starter Thread starter pauluk
  • Start date Start date
P

pauluk

I have a problem with the following code. What happens is it sends th
file as an attachment fine the file is named correctly. But then when
open the file from my email it is named different.

i.e file sent Part of EVRG1.xls when i open it is called Part O
EVRG11

Sub Mail_ActiveSheet()
Dim wb As Workbook
Application.ScreenUpdating = False
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Part of " & ThisWorkbook.Name
.SendMail "", _
"EVRG1"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
End Su
 
Problem was due to the temp files. When opening a xls file from outloo
it temp stores in the temp files, until shut down.

so automacally the file was called evrg1
 
Back
Top