Do not use for each or a loop from 1 to Items.Count since deleting will
change the count.
Use "for i=Items.Count to 1 step -1" instead

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Luis" <Luis@discussions.microsoft.com> wrote in message
news:73BD0B3D-31E6-40B9-96A9-C7C660AF1CA3@microsoft.com...
> Can someone let me know how to delete four messages in a Folder? I have
> tried
> to find information on it but there is not VBA code samples. Use the code
> below but it does not delete all the messages.
>
> For Each MailItem In MyFolder.Items
> Debug.Print MailItem.Delete
> Next MailItem
>
> Any suggestions and/or guidance will be helpfull.
>
> Luis
20 JunDelete Message with VBA.Luis
20 Jun|- Re: Delete Message with VBA.Dmitry Streblechenko
20 Jun\ Re: Delete Message with VBA.Sue Mosher [MVP-Outlook]
All times are in (US) Eastern Daylight Time (GMT -4:00)