[Python] Checking a checkBox in .docx form with Python using docx module

Discussão em 'Python' iniciado por Stack, Junho 17, 2025.

  1. Stack

    Stack Membro Participativo

    I am attempting to fill out a word document form with Python 2.7's docx module. I can modify text elements just fine but I am having difficulty figuring out how to check a yes or no checkbox.

    How do I go about checking one the the checkboxes in the form. I have tried a few different ways but I think it all comes do to me not know how the docx xml is structured when it comes to check boxes.

    Am I able to use the Bookmark property to find a specific checkbox and check it as seen in the picture below?

    [​IMG]

    I have uploaded a copy of the test form to Google Drive here.

    Continue reading...

Compartilhe esta Página