I got my answers to the questions above. I easily picked out my folder. I ran the code as written and bumped into several problems which I will iterate. The code checks for olkMsg.Class = olMail. For my purposes this does not work. I am looking at Mail Delivery System Undeliverable notifications. For it to read any of these I had to comment out the If olkMsg.Class = olMail and End If. The next item was a
on the GetSMTPAddress(olkMsg, intVersion) and then
Quote:
Outlook doesn't support this property or method
|
for olkMsg.RecerivedTime and olkMsg.ReceivedByName which I assume are not properties of notifications. I commented those three lines out and the code finished running. When it came time to save the files it took about 10 minutes, but it finally finished. The end product though was an empty file except for the headers. The objective is to collect all the email addresses found in the notification files and a few scattered messages. If I could get this code to just run for all the notifications it would be a big help.