I am trying to save a part of a Word document into a customxmlpart temporarily. E.g. I am implementing a "hide" feature, which is missing in the 2016 apis.
I will have user write those parts in a content control, and read the ooxml contents of it. This much I have done successfully.
Now I need to hide the ooxml inside the same document, to read it later.
I was thinking the functions in Office.CustomXmlParts, e.g. addAsync(), getByIdAsync(), and getByNamespaceAsync() should do the job, but there are problems:
- addAsync() does not seem to give you any id or namespace, so that you can get the xml later. Where do I get the id/namespace to give to get... methods?
- Also Office.CustomXmlParts does not list a constructor. How do I get one to begin with?
I am new to this, thanks.