Skip to main content

Find and replace picture

Swap pictures, found by alternative text or by their order across the slides, for a new image file, keeping the position and, unless a new size is given, the size.

Command in the PowerPoint toolkit · id ooa.powerpoint/find_replace_picture · 10 inputs (1 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
ImageFileYesNew image file.
Alt textStringNoReplace every picture whose alternative text equals this.
IndexNumberNo1-based position of the picture counting across all slides; used when alt_text is empty.
SessionStringNopowerpointPresentation session.
SlideNumberNoOnly look on this 1-based slide (index then counts on that slide); all slides when empty.
OccurrenceStringNoallWith alt_text: replace all matching pictures, or only the first or last one in slide order.
New alt textStringNoNew alternative text for the replaced pictures; kept when empty.
WidthNumberNoNew width in points; the current size is kept when width and height are empty.
HeightNumberNoNew height in points.
Keep aspect ratioBooleanNotrueWhen only width or only height is given, scale the other side to the new image's proportions.

Outputs​

OutputTypeWhat it is
countNumberNumber of pictures replaced.