Jakob76's avatar
Jakob76
Copper Contributor
Feb 21, 2023
Status:
New

Make it possible to use insertOoxml in a Word Addin with locked sections

I am using the getOoxml method in a Javascript Word Addin to retrieve the XML contents of a Word document. After applying the changes I use the insertOoxml method to replace the entire document. This works well,

but...

When one or more sections contain locked components, e.g. ContentControls I get a RichApi error. It is possible to set the cannotDelete property (which makes it possible to replace the controls) of RichText Content Controls to false. But other ContentControls such as plain text Controls are not supported in the Office-js library.

Is there a way to set the cannotDelete property of non RichText ContentControls to false programmatically in the Word Addin. Or another workaround to make it possible to use the insertOoxml method in combination with a partially locked document?

 

Yun_Wang

No CommentsBe the first to comment