I have a question on using python to identify texts with certain features from word document
I wish to extract texts that are bold and that have quotations around them for example:
" This is a "sentence" in word document. "
How can I identify the word "sentence" in python?
This is what I have at the moment:
from docx import Document
document = Document(filepath)
short_list = []
for paragraph in document.paragraphs:
for run in paragraph.runs:
if run.bold:
short_list.append(run.text)
Thank you all for your help!