PDA

View Full Version : Solved: move all items in a folder



BrianMH
04-21-2011, 04:53 AM
SROitems is a outlook.items collection for a specific folder. For some reason this is only moving exactly half of the collection. Any ideas why? This one is driving me nuts.

For Each myItem In SROItems
myItem.Move olToFolder
Next

BrianMH
04-21-2011, 05:45 AM
I managed to solve it. The item collection itself seems to change as you move items out of the folder. The below worked for me.


For i = SROItems.Count To 1 Step -1
SROItems.Item(i).Move olToFolder
Next