-1

I have a folder with 200ish msg files from Outlook which I need to put in a single CSV where each column represents one msg with corresponding subject, body, to etc.

Any good idea how to do that without doing it manually?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
eskay
  • 23
  • 3
  • Does this answer your question? [Excel VBA: Loop Through a Directory of .msg files](https://stackoverflow.com/questions/56569481/excel-vba-loop-through-a-directory-of-msg-files) – niton Jul 07 '22 at 13:02

1 Answers1

0

You can automate Outlook and Word to get the job done. For example, you can automate Outlook from Excel or otherwise in VBA. Read more about that in the Automating Outlook from a Visual Basic Application article.

The Outlook object model provides the NameSpace.OpenSharedItem method which opens a shared item from a specified path or URL. This method is used to open iCalendar appointment (.ics) files, vCard (.vcf) files, and Outlook message (.msg) files. The type of object returned by this method depends on the type of shared item opened. So, you can use that method to open the MSG file from the disk and then read its properties for filling a spreadsheet.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45