from docx import document document = Document('sample.docx') type(document) document.paragraphs type(document.paragraphs) document.paragraphs(0) document.paragraphs[0].text document.paragraphs[1].text index = 0 for para in document.paragraphs: index+=1 if (len(para.text)>0): print("\n paragraph",index,"is") print(para.text)
In this ,I have used pip install python-docx even after installed , i have found No module found error. [image: image.png] help me to fix this problem and is this is the correct way to extract txt from docs?
_______________________________________________ Chennaipy mailing list Chennaipy@python.org https://mail.python.org/mailman/listinfo/chennaipy