Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to extract email-id from a .docx file  RSS feed

 
Siddique Ansari
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone, i am trying to extract email-id from a .doc or .docx file from a folder. My code is running fine for .doc file but for .docx its not showing anything. What should i do?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't treat a structured file format as if it were text. For DOC that may work by chance, but for DOCX it won't (because its contents are compressed). You need to use a library like Apache POI to get at the content.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!