1

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!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.