You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not all documents will have all styles defined. A good next step might be to list out the styles in the current document with something like:
forstyleindocument.styles:
print(style.name)
It could also be that documentation is out of date, you might try styles["Body Text"] or styles["BodyText"]. I believe we changed from looking up by WD_STYLE member to style.name a while back.
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!
The text was updated successfully, but these errors were encountered: