Get Started
Usage API
More information

Copy

Copy() → { ApiInlineLvlSdt }

Create a copy of an inline content control. Ingonore comments, footnote references, complex fields.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiInlineLvlSdt

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oInlineLvlSdt = Api.CreateInlineLvlSdt();
oInlineLvlSdt.AddText("This is an inline text content control.");
oParagraph.AddInlineLvlSdt(oInlineLvlSdt);
oCopyInlineLvlSdt = oInlineLvlSdt .Copy();
oParagraph.AddLineBreak();
oParagraph.AddInlineLvlSdt(oCopyInlineLvlSdt);
builder.SaveFile("docx", "Copy.docx");
builder.CloseFile();

Resulting document