Hi all,
I have a number of Outlook .msg files saved to a shared folder (ie outside of Outlook). I am trying to write some VBA in Excel that extracts the message body text from each in turn (as a string)...and then does some other stuff with the contents of the string.
I've done a similar thing with word documents but I'm struggling to 'get at' the text in the .msg files.
So far I have the code below. I like to think I'm on the right track at least, but I'm stuck at the line where I'm trying to set up a reference to the msg file. Any advice will be appreciated...
Dim MyOutlook As Outlook.Application
Dim MyMail As Outlook.MailItem
Set MyOutlook = New Outlook.Application
Set MyMail = '? stuck here!
Dim FileContents As String
FileContents = MyMail.Body
Thanks
Bookmarks