You need to step backwards - when you move forward you'll skip every
other appt. to do this you need to get a count of appt first then run
through them backwards:
For i = [#of appt] To 1 Step -1
[delete appts]
Next i
Diane Poremsky [MVP - Outlook]
Outlook Tips:
http://www.outlook-tips.net/
Outlook & Exchange Solutions Center:
http://www.slipstick.com/
OutlookForums
http://www.outlookforums.com
On 9/7/2011 12:41 PM, Filips Benoit wrote:
> Dear All,
>
> The code below does not run always correctly.
> Somethimes appointments in the specific month has not been deleted !
>
> Can't see why!
>
> 'Delete all appointment in this month
> For Each objAppointement In myNewFolder.Items
> If Month(objAppointement.Start) = iMonth And Year(objAppointement.Start)
> = iYear Then objAppointement.Delete
> DoEvents
> Next
>
> Thanks,
>
> Filip