Help with e-mail macro

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
 
P

pauluk

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top