# PowerPoint

## CountSlides

Counts the slides from a powerPoint document.

#### Syntax <a href="#pragma-line-6390" id="pragma-line-6390"></a>

```
CountSlides ( Document )
```

#### Parameters <a href="#pragma-line-6396" id="pragma-line-6396"></a>

***Document***\
&#x20;The PowerPoint document.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-6403" id="pragma-line-6403"></a>

Int

## GetSlideThumbnail

Create a thumbnail image from a PowerPoint slide by index. A dictionary with the image as document (key: 'Thumbnail'), the slide notes (key: 'Notes'), slide title (key: 'Title') and slide index (key: 'Index') returned.

#### Syntax <a href="#pragma-line-6412" id="pragma-line-6412"></a>

```
GetSlideThumbnail ( Document , Index [, Width] )
```

#### Parameters <a href="#pragma-line-6418" id="pragma-line-6418"></a>

***Document***\
&#x20;PowerPoint document\
&#x20;Type: Document

***Index***\
&#x20;Index of the slide in Presentation.\
&#x20;Type: Int

***Width*** (optional)\
&#x20;The desired width (x dimension) in pixel.\
&#x20;Type: Int

#### Return Type <a href="#pragma-line-6433" id="pragma-line-6433"></a>

Dictionary\<Any,Any>

## RemoveAllSlides

Remove all slides in PowerPoint document for the presented index list. The modified Ppt document is returned.

#### Syntax <a href="#pragma-line-6442" id="pragma-line-6442"></a>

```
RemoveAllSlides ( Document , IndexList )
```

#### Parameters <a href="#pragma-line-6448" id="pragma-line-6448"></a>

***Document***\
&#x20;The PowerPoint Document.\
&#x20;Type: Document

***IndexList***\
&#x20;List of indexes that are removed (blacklist).\
&#x20;Type: List\<Int>

#### Return Type <a href="#pragma-line-6459" id="pragma-line-6459"></a>

Document

## RemoveAllSlidesExceptFor

Remove all slides in PowerPoint document except for the presented index list. The modified Ppt document is returned.

#### Syntax <a href="#pragma-line-6468" id="pragma-line-6468"></a>

```
RemoveAllSlidesExceptFor ( Document , IndexList )
```

#### Parameters <a href="#pragma-line-6474" id="pragma-line-6474"></a>

***Document***\
&#x20;The PowerPoint Document.\
&#x20;Type: Document

***IndexList***\
&#x20;List of indexes that are NOT removed (whitelist).\
&#x20;Type: List\<Int>

#### Return Type <a href="#pragma-line-6485" id="pragma-line-6485"></a>

Document


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tivity.one/building-an-application/execution/scripting/functions/powerpoint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
