Iterate through folder items using Redemption

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

What is the quickest/best way to iterate through email items in an Exchange
folder? thanks.
 
Either a for loop of the RDOItems collection or using GetFirst, GetNext. Six
of one, half dozen of the other.

If you don't need to actually open the items or read properties that are
very large such as Body the quickest way of all is to set up a MAPITable for
the items and iterate that. Quite a bit faster than an Items loop iteration.
 
Actually, all I need to do is move all of the items in this one folder to
another. Can you point me in the direction of sample code for MAPITable? Or
there wouldn't happen to be some sort of bulk move method that I'm not aware
of right? Thanks Ken.
 
You woudl needto move the items one item at a time.
Use a down loop and move items one by one:
for i= Items.Count to 1 step -1
Msg = Items.Item(i)
Msg.Move(SomeTargetFolder)
next

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
Back
Top