ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete email after Excel form sent (https://www.excelbanter.com/excel-programming/371732-delete-email-after-excel-form-sent.html)

Noemi

Delete email after Excel form sent
 
Hi
Is there a way to have the email permenantly delete from your sent box in
Outlook once an excel form has been sent.

The code I current have is

With EOutMail
.To = "ASCR"
.CC = ""
.BCC = ""
.Subject = "ADV - " & varEmailCountry
.Body = "Hi," & vbNewLine & stMessage & vbNewLine & vbNewLine
.Attachments.Add ActiveWorkbook.FullName
.DeleteAfterSubmit = True
.Send 'or use .Display
End With
Set EOutMail = Nothing
Set EOutApp = Nothing

Reason we need to delete permenantly is becuase the forms can be large which
prevents the next form from emailing.

Thanks


All times are GMT +1. The time now is 07:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com