Sort and then cut records to Cut records and then sort

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



i have the following code to sort out the records into a text file.
********************
Set KKK = objfolder.Items
KKK.Sort "Start", False
For Each Item In KKK
If Item.Class = 26 Then
If Item.Start >= Now Or Item.End >= Now Then
With webfile
.writeline Item.Subject
End With
End If
End If
Next
********************
there are too many records in the folder now. i wish to change the code to
cut out the records first and then sort them in ascending order. i tried
out the following code but fail to item into items code. Could you give me
a hand or hints to do it? Thanks a lot.

above method : sort in ascending order first, and then cut the records out
of the date range.

below method : cut the records out of the date range, and then assign them
in a object, and then sort the items in the object in ascending order.

i think i have technical difficulties in assigned the new object at code ROW
5

**********************************
Set JJJ = objfolder.Items
For Each Item In objfolder.Items
If Item.Class = 26 Then
If Item.Start >= Now Or Item.End >= Now Then
JJJ.ItemAdd Item
End If
End If
Next
JJJ.Sort "Start", False
For Each Item In JJJ
With webfile
.writeline Item.Subject
End With
Next
*******************************


.



Relevant Pages

  • Re: Sort and then cut records to Cut records and then sort
    ... Author of Configuring Microsoft Outlook 2003 ... >i have the following code to sort out the records into a text file. ... > cut out the records first and then sort them in ascending order. ... sort in ascending order first, and then cut the records out ...
    (microsoft.public.outlook.program_vba)
  • Re: Sort and then cut records to Cut records and then sort
    ... > to cut out the records first and then sort them in ascending order. ... > tried out the following code but fail to item into items code. ... sort in ascending order first, and then cut the records out ...
    (microsoft.public.outlook.program_vba)
  • Re: Sorting Problem in Report
    ... That is a proper sort for a text field that is storing number characters. ... You must set the sort order in the report. ... ascending order. ...
    (microsoft.public.access.gettingstarted)
  • Re: [PATCH] sort: Introduce generic list_sort function
    ... + * in ascending order. ... sort: Introduce generic list_sort function ... another in ubifs. ... void sort(void *base, size_t num, size_t size, ...
    (Linux-Kernel)
  • Re: Browsing the newly messed up Archive.org (continued)
    ... Orlando Enrique Fiol wrote: ... This gives you all the shows from that year in ascending order, ... That then grays out the same sort by ... I ain't a friend to change." ...
    (rec.music.gdead)