Copy
Creates a copy of an block content control. Ignores comments, footnote references, complex fields.
Syntax
expression.Copy();
expression - A variable that represents a ApiBlockLvlSdt class.
Parameters
This method doesn't have any parameters.
Returns
Example
Duplicate a content control and place the copy in a document.
// How do I copy a content control and add the duplicate to the same document?
// Reuse a content control by making an exact copy and appending it elsewhere in a document.
let doc = Api.GetDocument();
let blockLvlSdt = Api.CreateBlockLvlSdt();
let paragraph = blockLvlSdt.GetContent().GetElement(0);
paragraph.AddText("This is an block level content control.");
doc.Push(blockLvlSdt);
doc.Push(blockLvlSdt.Copy());