Delete
Delete all contents of the current range
Returns:
- Type
-
bool
Example
Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oParagraph.AddText("ONLYOFFICE delete text Document Builder");
oRange = oDocument.GetRange(10, 19);
oRange.Delete();
builder.SaveFile("docx", "Delete.docx");
builder.CloseFile();
Resulting document