Skip to main content

ApiDocumentContent

Represents the ApiDocumentContent class.

Methods

MethodReturnsDescription
AddElementbooleanAdds a paragraph or a table or a blockLvl content control using its position in the document content.
AddTextApiRunAppends the specified text to the end of the document content.
GetAllParagraphsApiParagraph[]Returns an array of all paragraphs from the current document content.
GetClassType"documentContent"Returns a type of the ApiDocumentContent class.
GetCurrentParagraphApiParagraphReturns the current paragraph where the cursor is located.
GetCurrentRunApiRunReturns the current run where the cursor is located.
GetElementDocumentElementReturns an element by its position in the document.
GetElementsCountnumberReturns a number of elements in the current document.
GetInternalIdstringReturns an internal ID of the current document content.
GetTextstringReturns the inner text of the current document content object.
PushbooleanPushes a paragraph or a table to actually add it to the document.
RemoveAllElementsbooleanRemoves all the elements from the current document or from the current document element.
RemoveElementbooleanRemoves an element using the position specified.
SetTextApiRunReplaces all content of the current document content object with the specified text,