DeleteAll Method (IMessages)
Topic Last Modified: 2006-06-13
Deletes all Message objects in the collection along with all associated files on the file system.
Applies To
Type Library
Microsoft CDO for Exchange 2000 Library
DLL Implemented In
CDOEX.DLL
Syntax
Sub DeleteAll()
HRESULT DeleteAll
();
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
The DeleteAll method deletes all Message objects in the collection. In addition, it deletes the file from which each Message object was derived.
Example
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