Skip to content

Power Point Actions

Create and Edit a Power Point

Actions

powerpoint.create

Create a new PPTX

Parameters:

wide - (default=True)

Return:

presentation - Power Point object to be used with other actions

Exceptions:

powerpoint.open

Open an existing PPTX

Parameters:

filepath - Path to PPTX file

Return:

presentation - Power Point object to be used with other actions

Exceptions:

FileNotFoundException - In case filepath is not found

powerpoint.add_slide

Add a new slide to PPTX

Parameters:

presentation - Power Point object return by powerpoint.open or powerpoint.create

layout_id - Select layout ID(default=0)

Return:

slide - Slide object that has been added

Exceptions:

InvalidLayoutIdentifier - In case layout_id is invalid

powerpoint.get_placeholder

Get a placeholder of a given slide

Parameters:

slide - Slide where placeholder is found

placeholder_idx - Placehold index (Number in sequence of placeholders (count start from 0))

Return:

placeholder - Desired Placeholder

Exceptions:

InvalidPlaceholder - In case placeholder_idx is invalid

powerpoint.get_slide

Get an existing slide from PPTX

Parameters:

presentation - Power Point object return by powerpoint.open or powerpoint.create

slide_number - Slide page number

Return:

slide - Slide object to be used with other actions

Exceptions:

InvalidSlide - In case slide number is invalid

powerpoint.insert_picture

Get a placeholder of a given slide

Parameters:

slide - Slide object to insert the picture in

placeholder_idx - Placehold index (Number in sequence of placeholders (count start from 0))

image_path - path to image to be inserted

Return:

placeholder - Placehold that the image was inserted

Exceptions:

InvalidPlaceholder - In case placeholder_idx is invalid

powerpoint.save

Save all changes on PTTX

Parameters:

presentation - Power Point object return by powerpoint.open or powerpoint.create

path - Path to save powerpoint

Return:

This aciton givers no return

Exceptions:

This action gives no exceptions

powerpoint.set_text

Set a text in given placeholder

Parameters:

slide - Slide object where

placeholder_idx - Placehold index (Number in sequence of placeholders (count start from 0))

text - Text to be setted

Return:

placeholder - Edit placeholder

Exceptions:

InvalidPlaceholder - In case placeholder_idx is invalid