CoolSeepFace
CoolSeepFace

Reputation: 23

Python olefile extract text of body

I been trying to extract the text content of a msg file in the disk using python module olefile. But getting AttributeError: OleFileIO instance has no attribute 'read'. Tried to read olefile API but could not get any clue. Thank you.

import sys,olefile

x=olefile.OleFileIO('dkd.msg')

print x.read()

Upvotes: 2

Views: 1838

Answers (1)

Bhargav Rao
Bhargav Rao

Reputation: 52101

Try

y = x.openstream('WordDocument'); print y.read()

Upvotes: 1

Related Questions