Remove shapes from slides

Description

Removes shapes from slides in a presentation.

(function()
{
  var oPresentation = Api.GetPresentation();
  for (let i = 0; i < 10; i++) {
    var oSlide = oPresentation.GetSlideByIndex(i);
    var aShape  = oSlide.GetAllShapes();
    aShape[0].Delete();
  }
})();

Methods used: GetPresentation, GetSlideByIndex, GetAllShapes

Result

Next blank row

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).