Skip to main content

ApiPresentation

Class representing a presentation.

Methods​

The following table lists the available methods.

MethodReturnsDescription
AddMasterbooleanAdds the slide master to the presentation slide masters collection.
AddMathEquationbooleanAdds a math equation to the current presentation.
AddSlideNoneAppends a new slide to the end of the presentation.
ApplyThemebooleanApplies a theme to all the slides in the presentation.
CreateNewHistoryPointNoneCreates a new history point.
EnterTextbooleanAdd text to the document on the cursor position.
GetActiveShapeApiShape | nullReturns the shape that is currently selected or being edited in the presentation.
GetActiveTableApiTable | nullReturns the table that is currently selected or being edited in the presentation.
GetAllChartsApiChart[]Returns an array with all the chart objects from the presentation slides, excluding slide layouts and slide masters.
GetAllCommentsApiComment[]Returns all comments from the current presentation.
GetAllDrawingsDrawing[]Returns all drawing objects from the presentation slides, excluding slide layouts and slide masters.
GetAllImagesApiImage[]Returns an array with all the image objects from the presentation slides, excluding slide layouts and slide masters.
GetAllOleObjectsApiOleObject[]Returns an array with all the OLE objects from the presentation slides, excluding slide layouts and slide masters.
GetAllShapesApiShape[]Returns an array with all the shape objects from the presentation slides, excluding slide layouts and slide masters.
GetAllSlideMastersApiMaster[]Returns an array of all slide masters from the current presentation.
GetAllSlidesApiSlide[]Returns an array of all slides from the current presentation.
GetAllTablesApiTable[]Returns an array with all tables from the presentation slides, excluding slide layouts and slide masters.
GetClassType"presentation"Returns a type of the ApiPresentation class.
GetCoreApiCoreReturns the core properties interface for the current presentation.
GetCurSlideIndexnumberReturns the index for the current slide.
GetCurrentSentencestringReturns the current sentence or a part of the current sentence at the cursor.
GetCurrentSlideApiSlide | null | undefinedReturns the current slide.
GetCurrentVisibleSlideApiSlide | nullReturns the current visible slide.
GetCurrentWordstringReturns the current word or a part of the current word at the cursor.
GetCustomPropertiesApiCustomPropertiesReturns the custom properties from the current presentation.
GetCustomXmlPartsApiCustomXmlParts | nullRetrieves the custom XML manager associated with the presentation.
GetDocumentInfoobjectReturns the document information:
GetDrawingsByNameDrawing[]Returns a collection of drawing objects from the presentation slides filtered by their names, excluding drawing objects from slide layouts and slide masters.
GetHeightEMUReturns the presentation height in English measure units.
GetLoopUntilStoppedbooleanReturns whether the presentation loops continuously until the user stops it.
GetMasterApiMaster | nullReturns a slide master by its position in the presentation.
GetMastersCountnumberReturns a number of slide masters.
GetSelectionApiSelectionReturns the selection from the current presentation.
GetSlideByIndexApiSlide | null | undefinedReturns a slide by its position in the presentation.
GetSlideCountnumberReturns a number of slides.
GetSlidesCountnumberReturns a number of slides.
GetStyleApiStyle | nullReturns the presentation style by its name.
GetVisitorApiPresentationVisitorReturns a visitor object for traversing the slides, layouts, masters, speaker notes, drawings and text of the presentation.
GetWidthEMUReturns the presentation width in English measure units.
InsertFromFilenumberInserts slides from the specified file into the current presentation.
InsertParagraphBreakbooleanAdd paragraph to the document on the cursor position.
MoveCursorDownbooleanMoves the cursor down.
MoveCursorLeftbooleanMoves the cursor to the left.
MoveCursorRightbooleanMoves the cursor to the right.
MoveCursorUpbooleanMoves the cursor up.
MoveToNextCellbooleanMoves the cursor to the next table cell.
MoveToPrevCellbooleanMoves the cursor to the previous table cell.
RemoveSlidebooleanRemoves a slide at the specified position from the presentation.
RemoveSlidesbooleanRemoves a range of slides from the presentation.
ReplaceCurrentImageNoneReplaces the current image with an image specified.
ReplaceCurrentSentencebooleanReplaces the current sentence or a part of the current sentence at the cursor with the specified text. If there is no sentence at the cursor, for example, in an empty paragraph, the specified text is inserted at the cursor position.
ReplaceCurrentWordbooleanReplaces the current word or a part of the current word at the cursor with the specified text.
SearchApiTextRange[]Searches for the specified text in the presentation and returns all found occurrences as text ranges.
SearchAndReplacebooleanFinds and replaces the text in the presentation.
SelectCurrentSentencebooleanSelects the sentence at the cursor. The current text selection, if any, is removed first.
SelectCurrentWordbooleanSelects the word at the cursor. The current text selection, if any, is removed first.
SetLanguagebooleanSpecifies the languages which will be used to check spelling and grammar (if requested).
SetLoopUntilStoppedbooleanSets whether the presentation loops continuously until the user stops it.
SetSizesNoneSets the size to the current presentation.
SlidesToJSONJSON | nullConverts the slides from the current ApiPresentation object into the JSON objects.
ToJSONJSONConverts the ApiPresentation object into the JSON object.