← 返回首页
Unable to detect bullet point style in a docx file · Issue #1540 · 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

Unable to detect bullet point style in a docx file #1540

New issue
New issue

Description

Hello, I'm currently working on a project where I at the moment need to detect which paragraphs use a bullet point, and the method I found in the documentation to do so was by using the paragraph.style.name property, but when I attempt to search for it using the style property the style of the paragraphs with bullet points is the basic "Body Text" and not "Bullet Point" as what I'd expect. The paragraph itself in Google Docs and LibreOffice Writer are detected as unordered lists, so that is working correctly, so I can't figure out what is happening for this to not work.

Is there an alternative method currently available to detect them or am I messing up somewhere with this?

My code currently is this:

file = "foo/bar.docx" doc = Document(file) for paragraph in doc.paragraphs: print(paragraph.text, "\n", paragraph.style.name)

TestDocument.docx

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.