Hi there,
I have a macro which updates a spreadsheet, it then creates an email with the spreadsheet as an attachment for sending out.
I obtained the code to do this from a previous thread:
http://www.excelforum.com/excel-prog...ice-email.html
Here is the code I am using for the email part of the macro:
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "recipient@fictionaladdress.com"
.CC = ""
.BCC = ""
.Subject = "here is my spreadsheet"
.Display
.Attachments.Add ActiveWorkbook.FullName
End With
Set OutMail = Nothing
Set OutApp = Nothing
The trouble is, the file that it attaches to the email is the last saved version - not the version with the updates. I don't want the macro to do a file save first, as I may not want it to over-write the existing file on the disk. But I do want it to set up the email for sending the new version out.
This is using Excel 2007.
Any ideas, please?
Thanks!
ssu95bm
Bookmarks