且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

对于每个循环:不删除所有电子邮件

更新时间:2023-01-17 17:31:14

删除(或移动)项目1时,项目2移至位置1.跳过该项目,移至现在位于位置2的项目3. .对于每一个都以相同的方式工作.

When you delete (or move) item 1, item 2 moves into position 1. You skip that item and move on to item 3 which is now in position 2. For Each works the same way.

一种解决方法是For i = oInboxFolder.Items.Count到1步-1

One way of dealing with this is For i = oInboxFolder.Items.Count to 1 step -1