Skip to content

Setting Custom properties on a Word doc in Linux not working #102

@johantre

Description

@johantre

I've build a Word document generator that sets Custom properties in a Word document (serving as template) and saves the document afterwards. Like that each time a new document is generated, but with other Custom Properties set that can be sent together with an offer.

This all works like a charm on Windows.
However, running this on an Ubuntu Linux box, the properties aren't set and stay their default value: "****" :-(
My intention was to get this working in a Github pipeline, so preferably having this working under ubuntu-latest runner.
I've added basically the way I do this to illustrate below.

from docxcompose.properties import CustomProperties
from docx import Document

document = Document("WordTemplate.docx")
CustomProperties(document).update("my custom prop name", "my custom prop value")
document.save("new document name to save.docx")

My question: does docxcompose support Linux in setting Custom Properties?
I have a setup under ubuntu where I can debug etc. Any tips to investigate further would be very welcome.
Could this be a permission issue?
Is there a way I can check more deeply when a Custom Property is actually set or not?
Any pointers where/how to search would be very very welcome.
I do not encounter any exceptions along the way while debugging so I'm a little bit stuck in how to investigate further.
The original .py script I've added as a .txt file if it is of any help. That is somewhat more complex however.

Any pointers to help investigating any further would be very welcome. The most important answer would be the first question.
Is linux supported or not for doing this kind of things?

Thanks alot!

GenerateOfferDocuments.txt

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