'Delete Outlook.MailItem from the Deleted Items folder don't work
After moving an Outlook.MailItem from inbox to "Deleted Items" folder, I am trying to delete permanently the MailItem by doing below:
Outlook.MailItem olmi = omi.Move(ThisAddIn.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDeletedItems));
olmi.Delete();
Outlook MailItem is moved correctly from inbox to deleted items folder but it is not being deleted from the Deleted items folder. What am I doing wrong?
Solution 1:[1]
You can get a new MailItem instance and then call the Delete method. The GetItemFromID can help with retrieving a new instance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Eugene Astafiev |
