How to: Delete All Items and Subfolders in the Deleted Items Folder
Office 2007
| Outlook Developer Reference |
This topic shows a code sample in Visual Basic for Applications (VBA) that deletes all items and subfolders in the Deleted Items folder.
Note |
|---|
| When you delete items or folders from a collection, you must use a decrementing loop counter. An incrementing loop counter will fail. |
You can only empty the Deleted Items folder and you cannot remove the folder itself. However, to delete subfolders of the Deleted Items folder, you can simply delete the subfolder without first deleting its contents.
|
Note