Get Started
Documentation

GetContent

GetContent() → { ApiDocumentContent }

Get the content of this container

Returns:

Type
ApiDocumentContent

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oBlockLvlSdt = Api.CreateBlockLvlSdt();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("This is a block text content control.");
oBlockLvlSdt.AddElement(oParagraph, 0);
oDocument.AddElement(0, oBlockLvlSdt);
oBlockLvlSdt.GetContent().GetElement(1).AddText("This is a content of the container.");
builder.SaveFile("docx", "GetContent.docx");
builder.CloseFile();

Resulting document