*** Get a local referenece to the collection of of items in the Inbox loItems = loInbox.Items *** Process all the items in the inbox *** If it is a mail item, save it and process the attachments IF VARTYPE( loItems ) = 'O' FOR EACH loItem IN loItems IF loItem.Class = 43 && olMail *** Process the message and the attachments ENDIF ENDFOR ENDIF* Move the complete message to deleted items
loRootFolder = oNameSpace.GetDefaultFolder( 6 ) && Inbox