← 返回首页
WD_BUILTIN_STYLE gives no style with name · Issue #1439 · python-openxml/python-docx · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

WD_BUILTIN_STYLE gives no style with name #1439

New issue
New issue

Description

Starting from the minimal code given at https://python-docx.readthedocs.io/en/stable/api/enum/WdBuiltinStyle.html

from docx import Document from docx.enum.style import WD_STYLE document = Document() styles = document.styles style = 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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Footer

      © 2026 GitHub, Inc.