Hi, I'm trying to read in MSG file into SAS but wasn't able to do so.
Then I tried using LINUX command, I got it to convert to txt file but it wasn't readable by SAS. I used code like:
data _null_;
x "cd /source/data/";
x "rename .msg .txt *.msg";
run;
Can anyone help me in trying to read the Outlook MSG file from SAS? I'm ok with converting the msg file too into txt file but it should be SAS Readable.
Please help.
You need to download the Outlook messages as .txt files and not .msg files. You can't just rename an .msg file as .txt and expect it to behave as .txt, because .msg has its own encoding rules and is not a simple flat file like a .txt file.
If you can't create the .txt files from scratch, you can download and use a utility such as this one to read the .msg files.
Hi Ja5ya,
You can use this python tool also to extract txt from msg file.
https://github.com/TeamMsgExtractor/msg-extractor
Hope this help.
As a test, you can do a "File Save As" on an Outlook message you have opened.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.