I'm using the Office.js client API to add a custom property key to a Word document through context.document.properties.customProperties. However, when I export the document to OOXML format using context.document.body.getOoxml(), the custom properties are not present in the OOXML data.
Is there a way to include custom properties in the OOXML when reading it via Office.js? Or is there an alternative approach to access custom properties within the OOXML structure?
context.document.properties.customProperties.load();
context.document.properties.customProperties.add(property, value);
await context.sync();
var body = context.document.body;
var ooxml = body.getOoxml();
I also tried saving the document but nothing : context.document.save();
Thanks!