Skip to main content

InsertFromFile

Inserts slides from the specified file into the current presentation.

note

This functionality is available in paid ONLYOFFICE Docs editions.

Syntax​

expression.InsertFromFile(file, index, slideStart, slideEnd, keepSourceFormatting);

expression - A variable that represents an ApiPresentation class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
fileRequiredobjectAn object containing the information about the presentation to insert slides from.
indexOptionalnumberApiPresentation.GetSlidesCount()The 0-based position at which the new slides are inserted.
slideStartOptionalnumber0The 0-based index of the first slide to insert from the source file.
slideEndOptionalnumber-1The 0-based index of the last slide to insert from the source file.
keepSourceFormattingOptionalbooleanfalseSpecifies whether to keep the source formatting of the inserted slides.

Returns​

number