Hi,
I have 26 emails in a folder with path C:\Users\Peter\Desktop\New folder, all with the file extension .msg. I'd like to extract the sender, recipient, Cc, and other data from the emails, and set them in a spreadsheet. I found something that I thought would be helpful at a different forum (though, I don't need the body of the message in my spreadsheet), but I have a few problems with it.
First, how is that macro supposed to be called? When I'm in the VBA editor, and hit F5, the macro doesn't start.
Second, I can't see where I'm supposed to put the specific path I want to use into the code.
Third, just wanting to see what would happen, I deleted Path As String from the first line of the macro, then run the code, but the compiler gives me an error, saying that MyOutlook As Outlook.Application is a "User-defined type not defined."
Anyway, all I really care about is getting To, Cc, From, SentOn, and, if possible, a list of any attachments in the emails, I don't need the macro referred to above to work.
If this isn't clear, please feel free to ask for clarification. Thanks.
Peter
I have 26 emails in a folder with path C:\Users\Peter\Desktop\New folder, all with the file extension .msg. I'd like to extract the sender, recipient, Cc, and other data from the emails, and set them in a spreadsheet. I found something that I thought would be helpful at a different forum (though, I don't need the body of the message in my spreadsheet), but I have a few problems with it.
First, how is that macro supposed to be called? When I'm in the VBA editor, and hit F5, the macro doesn't start.
Second, I can't see where I'm supposed to put the specific path I want to use into the code.
Third, just wanting to see what would happen, I deleted Path As String from the first line of the macro, then run the code, but the compiler gives me an error, saying that MyOutlook As Outlook.Application is a "User-defined type not defined."
Anyway, all I really care about is getting To, Cc, From, SentOn, and, if possible, a list of any attachments in the emails, I don't need the macro referred to above to work.
If this isn't clear, please feel free to ask for clarification. Thanks.
Peter