J
Jacob F.
Greetings everyone,
I'm working on a macro for Outlook 2007 that will move read mail to a
folder. However, for some reason, it seems to be skipping messages in the
inbox. The relevant portion of the code is here:
If TypeOf Item Is MailItem Then
If Not (Item.UnRead Or Item.IsMarkedAsTask) Then
Item.Move ReadFolder
End If
End If
Next Item
When I first ran the macro, it would move most of the messages in a folder,
but not all of them. I ran it through the debugger instead and noticed that
some messages were being skipped. For example, if I have messages 1-10 in my
inbox, it might processs 1, 2, 3, then jump to 7, 8 ,9, 10.
Any idea why this would be happening? Is there some way I can get the
behavior I'm after?
Thanks,
Jacob
I'm working on a macro for Outlook 2007 that will move read mail to a
folder. However, for some reason, it seems to be skipping messages in the
inbox. The relevant portion of the code is here:
If TypeOf Item Is MailItem Then
If Not (Item.UnRead Or Item.IsMarkedAsTask) Then
Item.Move ReadFolder
End If
End If
Next Item
When I first ran the macro, it would move most of the messages in a folder,
but not all of them. I ran it through the debugger instead and noticed that
some messages were being skipped. For example, if I have messages 1-10 in my
inbox, it might processs 1, 2, 3, then jump to 7, 8 ,9, 10.
Any idea why this would be happening? Is there some way I can get the
behavior I'm after?
Thanks,
Jacob