Starting from the minimal code given at https://python-docx.readthedocs.io/en/stable/api/enum/WdBuiltinStyle.html
fromdocximportDocumentfromdocx.enum.styleimportWD_STYLEdocument=Document()
styles=document.stylesstyle=styles[WD_STYLE.BODY_TEXT]
gives the following error:
KeyError: "no style with name 'BODY_TEXT (-67)'"
I'm sure I'm doing something wrong, but if you know of a way I can fix this, I'd be very grateful. Thank you for your time!
Starting from the minimal code given at https://python-docx.readthedocs.io/en/stable/api/enum/WdBuiltinStyle.html
gives the following error:
I'm sure I'm doing something wrong, but if you know of a way I can fix this, I'd be very grateful. Thank you for your time!