The VbaProject file in outlook

I think I might have it.

If the attachment is saved and I paste to the Outlook folder (i just did Send) then I can extract the dud email name.

I just hit it with my ExtractToWord code (but altered to get To and save as file which gave the name

2009-07-24 18-00-01 'mike372@opti.com' Mike McGuire Subject was TestBouncer

....and there is the dud email address.

So about like the following.

1) Save attachments as normal which gets the attachment for the bounce backs.

2) Copy attachments to Send box in Outlook ( not sure how to that in bulk??)

3) Apply my ExtractToWord code which saves the file where the name includes the dud email.
 
If the saved attachments from the bounce backs are copied to an Outlook folder called Bounces then the following Excel macro gets the dud email addresses and the original sender email address which of course will be the same in most instances.

Dim myOlApp As Outlook.Application
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myfolders = myNameSpace.Folders
n = 1
Do Until myfolders.Item(n) = "Personal Folders"
n = n + 1
Loop
Set myfolder = myfolders.Item(n)
Set myfolder2 = myfolder.Folders("Bounces")
c = 1
n = 1
For Each Item In myfolder2.Items
itsj = Item.Subject

itsn = Item.To
itbo = Item.SenderEmailAddress
Cells(n, c) = itsn
Cells(n, c + 1) = itsb
Cells(n, c + 2) = itbo

n = n + 1
Next Item
 

Users who are viewing this thread

Back
Top Bottom