[Python example] capture the attachment example in the msg letter.
To capture the attachment of the msg Letter Writing case and handle it, find the Python module msg-extractor.
This mode is easy to use. However, this mode must be fixed in terminal and cannot be directly attached to the IDLE compiler.
So after a slight modification, you can use the subprocess mode to execute commands.
The complete program is available on my Github.
# The path where the msg parser is placed is srcfilePath = OS. path. join ('C: \ ', 'python2. 7.10 ') # msg alias name fileName = '2017. msg 'def MsgToExcelDatabase (srcfilePath, fileName): MailmsgPath = OS. path. join (srcfilePath, fileName) # Execute command using the subprocess sequence line # start extract attachment from 123.msg DIR = OS. path. join ('C: \ ', 'python2. 7.10 ', 'msg-extractor-Master', 'extractmsg. py') subprocess. call (['python', DIR, MailmsgPath]) # defMsgToExcelDatabase (srcfilePath, fileName) with the correct path and region name)