none
Exporting metadata from msg files on desktop RRS feed

  • Question

  • Hello,

    I need a quick help in completing a tedious task. I have more than 1000 .msg files in a folder on my desktop. I need to export the following information for each file in excel:

    1 Date of email received

    2 Time of email received

    3 From - Name (Sender)

    4 From - Email ID (Sender)

    5 Subject of email

    6 To - Name (Recipient)

    7 To - Email ID (Recipient)

    8 Body of email

    Can this be achieved with a vba macro. Could anyone please help me for completing this task.

    Thank you in advance! 

    Thursday, April 4, 2019 4:20 AM

All replies

  • 1. Loop through all files in the folder

    2. For each file, use Application.Session.OpenSharedItem to open the MSG file (returns MailItem object)

    3. For each MailItem object, extract the appropriate properties (DateReceived, Subject, SenderName, To, etc.) and copy them to your Excel spreadsheet.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!


    Friday, April 5, 2019 8:34 PM