Hi
I am using below code;
For I = oItems.Count - 1 To 0 Step -1 oItems(I).delete() End If
The problem is one element is always left from deletion. What am I doing wrong?
Thanks
Regards
"Michael Bauer [MVP - Outlook]" <mb[ at ]mvps.org> wrote in message news:14mouz2bqw8la.1o8glqtinwbr9.dlg[ at ]40tude.net...
[Quoted Text] > > > 1. See the GetDefaultFolder function. > > 2. Loop backwards through the Items collection of the folder, and check > each > item's UserProperties collection. Sample for a backward loop: > Dim i& > For i=Items.Count To 1 Step-1 > ... > Next > > 3. If you find the value in the UserProperties collection, call the item's > Delete method. > > -- > Best regards > Michael Bauer - MVP Outlook > > : Outlook Categories? Category Manager Is Your Tool > : VBOffice Reporter for Data Analysis & Reporting > : < http://www.vboffice.net/product.html?pub=6&lang=en>> > > Am Sun, 21 Dec 2008 20:26:45 -0000 schrieb John: > >> Hi >> >> I need to delete items from draft folder based on value of a user >> property >> xyz = "abc". The problems I have are; >> >> 1. How to access items in Draft folder? >> >> 2. How to select items based on condition user property xyz with value >> "abc"? >> >> 3. How to delete all items? >> >> Any help in achieving this would be appreciated. >> >> Thanks >> >> Regards
|