Export (0) Print
Expand All

Folder.Delete Method (Outlook)

Deletes an object from the collection.

Version Added: Outlook 2007

expression .Delete

expression A variable that represents a Folder object.

The Delete method deletes a single folder.

In general, deleting a folder does not require first deleting the items in the folder. Deleting the folder also deletes all items in the folder. An exception would be if the folder is an Outlook folder that cannot be deleted, such as the Inbox and the Deleted Items folder. In such cases, you can delete only the items of the folder but not the folder itself. To delete all items in the Items collection of the folder, you must delete each item starting with the last item in the folder. For example, in the items collection of a folder, AllItems, if there are n number of items in the folder, start deleting the item at AllItems.Item(n), decrementing the index each time until you delete AllItems.Item(1).

Concepts

Other resources

Show:
© 2015 Microsoft