I have a simple bit of code in Excel that creates an Email,adds an attachment and saves the email into the folder where the excel documentsits – easy enough so far. However it only saves the email in its ‘unfettered’state but I want it to save the email AND its attachments exactly as they arewhen sent. So basically if the user edits the attachment it will save theedited version. Can anyone help please?
Heres the bones of my code:
Set OutApp =CreateObject("Outlook.Application")
Set OutMail =OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To =""
' .CC = ""
' .BCC = ""
.Subject = “ “
.Body = “ “
.attachments.Add "\\C\My Folder\Attachment.docx"
.Display
OutMail.Save
.SaveAsThisWorkbook.Path & \My Folder\Emails" & .Subject & ".msg"
End With
With Application
.EnableEvents= True
End With
Heres the bones of my code:
Set OutApp =CreateObject("Outlook.Application")
Set OutMail =OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To =""
' .CC = ""
' .BCC = ""
.Subject = “ “
.Body = “ “
.attachments.Add "\\C\My Folder\Attachment.docx"
.Display
OutMail.Save
.SaveAsThisWorkbook.Path & \My Folder\Emails" & .Subject & ".msg"
End With
With Application
.EnableEvents= True
End With