-
JP2112,
I made the code changes you recommended. I also added a line to mark the mail item as unread.
Previous:
[VBA]
' parse each message in the folder holding the bounced emails
For Each Item In olFolder.Items
i = i + 1
strBody = Item.Body
Set olMatches = regEx.Execute(strBody)
If olMatches.Count >= 1 Then
badAddresses(i) = olMatches(0)
End If
Next
[/VBA]
Current:
[VBA]
' parse each message in the folder holding the bounced emails
For Each Item In olFolder.Items
i = i + 1
strBody = Item.Body
Set olMatches = regEx.Execute(strBody)
If olMatches.Count >= 1 Then
badAddresses(i) = olMatches(0)
Item.UnRead = False
End If
Next
[/VBA]
I used "Step Into" to run each line one by one. I get to the loop and it does just that....It loops, and each time the unread count goes down by one. I do not know how to break out of the loop to continue with the rest of the code. I also notice that it is not starting with the youngest mail item. It starts about 1/16th of the way down the list each time. I don't know if this info is useful or not.
Here is the problem. After testing it seems that it is finding the proper folder and running through the loop, so I try running the macro (F5). As soon as I do the cursor changes to the hour glass, unread item count does not change, and Outlook becomes unresponsive. I then have to manually shut down and restart Outlook. I am now very confused and have no idea what to do.
Thank you and anyone else for helping. I have another mass mailer in a week and I have to get these addresses removed from our database.
Joshua
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules