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.44k stars 486 forks source link

Setting/Overwriting Document Properties using Patcher #2701

Open 0x1234567890 opened 4 months ago

0x1234567890 commented 4 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,