Copy content control from a document into its custom XML

Modified on Mon, 5 Oct at 1:54 PM

With BaseExtensions, we are able to copy content controls from a document and paste them into the document's custom XML. This is generic command where we define a source and a destination in order to perform the copy from/to.

CMD

<Cmd case="BaseExtensions:copy-from-to" source="x" dest="x"/>

Parameters

source

Define the source from where to copy. At this moment, the only supported source is ContentControl.

This parameter is required.

dest

Define the destination to paste. At this moment, the only supported destination is CustomXML.

This parameter is required.

xmlPartName

Define the name of the custom XML part. If this parameter is not defined, it will add it to the custom XML part called "OfficeExtensions". If there is no existing custom XML part with the given name (or "OfficeExtensions"), it will automatically create a new part with the name.

This parameter is optional.

names

Define the name of the content controls that are to be copied. If there are more than one name, they should be separated with ";", e.g. "name1;name2;name3". If no names are defined, it will copy all content controls in the document.

This parameter is optional.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article