# Function to extract information about 'Abstract heading Font Style' from the document
def abstract_heading_font_style(word_file):
doc = Document(word_file)
font_styles = set()
for paragraph in doc.paragraphs:
if any(word in paragraph.text for word in ['Abstract', 'ABSTRACT', 'abstract']):
for run in paragraph.runs:
if any(word in paragraph.text for word in ['Abstract', 'ABSTRACT', 'abstract']) and run.bold:
font_styles.add(run.font.name)
return list(font_styles)
What I have tried:
I have used python docx library for doing this, I have tried multiple times but didn't find any satisfactory solution, plz find any relevant solution, Appreciation in Advance.