> For the complete documentation index, see [llms.txt](https://docs.tivity.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tivity.one/building-an-application/execution/scripting/functions/powerpoint.md).

# 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
