![]() ![]() This permanent deletion only works once I start the script a second time. Well, this basically works: The mail with this subject will be found in the deleted-items-folder and it will be deleted, yes. ![]() If (deletedFolder.Items(i).Subject) = "MY_SUBJECT" Then Set deletedFolder = Application.GetNamespace("MAPI"). Since I know the subject of this mail (because this triggered my rule in the first place), I tried the following approach: Sub doWorkAndDeleteMail(Item As Outlook.MailItem) But what I need to achieve is, to also delete this mail from the deleted-items folder. Now the email will sit in the deleted-items-folder. This part is easy: Sub doWorkAndDeleteMail(Item As Outlook.MailItem) ![]() The VBA script is then doing some stuff and then it should finally delete the original email. I created a rule, that starts a VBA-script depending on the subject of a received email (Rule: Subject "MY_SUBJECT" -> start script). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |