Get Started
Documentation

Delete

Delete() → { bool }

Delete all contents of the current range

Parameters:

This method doesn't have any parameters.

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