← 输入框|github.com|刷新
Skip to content

File opens in compatibility mode on Microsoft® Word for Mac #1543

Closed

Description

@kevko2020

I'm on Version 16.106 (26020821) and document saved by this always open in compatibility mode. Is this a known issue?

Activity

  1. scanny commented on Feb 23, 2026

    @scanny
    Contributor

    By default, python-docx uses its "built-in" blank template .docx file. Since that was created a while ago now, it could cause issues like this. The solution is to create your own blank "starting" document/template file and create documents starting with that: https://python-docx.readthedocs.io/en/latest/user/documents.html#really-opening-a-document

    Like:

    document = Document("my-blank-starting-template.docx")

    If you just open a new document in Word 2016 and save it as "my-blank-starting-template.docx" that should do the trick when combined with this difference in creating the initial document. Of course the name can be whatever you want, as long as it matches what you put in the code and it exists at the path you specify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions