-
With Regex, you are getting the first available email address. Whether that is the bounced email address remains to be seen, because some bouncebacks list both the intended (failed) recipient and the sender's email addresses.
Issue 1:
The reason your code points to the default Inbox is because you are using the GetDefaultFolder Method:
[VBA]olNS.GetDefaultFolder(olFolderInbox).Folders("Test")[/VBA]
Use the Folders Collection to walk down the non-default folder hierarchy, like this:
[VBA]olNS.Folders("Archive E-Mails").Folders("Inbox").Folders("Mail Failures")[/VBA]
Issue 2:
Try stepping through the code.
Issue 3:
Change this line:
[VBA]xlApp.Workbooks.Add[/VBA]
to
[VBA]xlApp.Workbooks.Open (your filename here)[/VBA]
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