Get Started
Usage API

AddInlineLvlSdt

AddInlineLvlSdt(oSdt) → { ApiInlineLvlSdt }

Add a inline container

Parameters:

Name Type Description
oSdt ApiInlineLvlSdt

if undefined or null, then new class ApiInlineLvlSdt will be created and added to paragraph.

Returns:

Type
ApiInlineLvlSdt

Example

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

Resulting document