Platform SDK: CDO for Windows 2000

DeleteAll Method

The DeleteAll method deletes all Message objects in the collection along with all associated files on the file system.

[Visual Basic]
Sub DeleteAll()
[C++]
HRESULT DeleteAll();
[IDL]
HRESULT DeleteAll();

Remarks

The DeleteAll method deletes all Message objects in the collection. In addition, the file from which each Message object is derived is also deleted.

Example

' Reference to Microsoft ActiveX Data Objects 2.5 Library
' Reference to Microsoft CDO for Windows 2000 Library
Dim iDropDir as New CDO.DropDirectory
Dim iMsgs as CDO.IMessages
Dim iMsg as CDO.Message

Set iMsgs = iDropDir.GetMessages

For Each iMsg in iMsgs
 ' process the message object
Next iMsg

' delete these when done. The associated files in the
' directory are deleted as well
iMsgs.DeleteAll