Iterate through folder items using Redemption

M

Mike

What is the quickest/best way to iterate through email items in an Exchange
folder? thanks.
 
K

Ken Slovak - [MVP - Outlook]

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.
 
M

Mike

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.
 
D

Dmitry Streblechenko

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
-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top