Answer the question
In order to leave comments, you need to log in
How to check if a paragraph is bold in python-docx?
Using python-docx I read a paragraph, how can I now check if it is bold?
I tried line.bold // line.run('bold').bold but apparently I'm not reading something from there, in the documentation I found only an example of filling out a document, if you take text from a paragraph, the formatting is reset.
document = docx.Document('test.docx')
line = document.paragraphs[0]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question