dolanmiu / docx

Easily generate and modify .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
https://docx.js.org/
MIT License
4.24k stars 479 forks source link

Setting/Overwriting Document Properties using Patcher #2701

Open 0x1234567890 opened 2 months ago

0x1234567890 commented 2 months ago

Hello everyone,

I'm currently working on a project where I'm creating and editing documents using the docx.js framework. My goal is to set or overwrite specific document properties such as Title, Tags, and Comments.

I've heard that this can be done using Patchers, but I'm not sure how to implement this. Can someone provide an example or guide on how to set or modify these properties in a document using docx.js and Patchers?

Here are the specific properties I want to edit:

Title Tags Comments If you have any code examples or links to helpful resources, I would greatly appreciate it.

image

Thank you in advance for your help!

Best regards,