Replace a Text Occurrence

Introduction

Using Aspose.Slides Cloud, you can easily replace all occurrences of text. Aspose.Slides Cloud provides you with the following methods for replacing text on a single slide or in an entire presentation.

ReplacePresentationText

API Information

API Type Description Resource
/slides/{name}/replaceText POST Replaces text in a presentation. ReplacePresentationText

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file.
oldValue string query true The text string to be replaced.
newValue string query true The text string to replace with.
ignoreCase boolean query false Indicates whether to ignore character case. False by default.
wholeWordsOnly boolean query false Indicates whether to replace only whole words that match the replace string. False by default.
password string header false The password to open the presentation.
folder string query false The path to the folder containing the presentation.
storage string query false The name of the storage contaning the folder.

In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.

Examples

Replace every word banana with the word orange in the document MyFolder/MyPresentation.pptx. Ignore character case.

cURL Solution

SDK Solutions

ReplacePresentationRegex

API Information

API Type Description Resource
/slides/{name}/replaceRegex POST Replaces text in a presentation that matches a specified regular expression. ReplacePresentationRegex

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file.
pattern string query true The regular expression to be replaced.
newValue string query true The text string to replace with.
ignoreCase boolean query false Indicates whether to ignore character case. False by default.
password string header false The password to open the presentation.
folder string query false The path to the folder containing the presentation.
storage string query false The name of the storage contaning the folder.

In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.

Examples

Replace every occurence of hello, hi or hey with hola in the document MyPresentation.pptx. Ignore character case.

cURL Solution

SDK Solutions

ReplaceSlideText

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/replaceText POST Replaces text on a presentation slide. ReplaceSlideText

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file.
slideIndex integer path true The 1-based index of the slide.
oldValue string query true The text string to be replaced.
newValue string query true The text string to replace with.
ignoreCase boolean query false Indicates whether to ignore character case. False by default.
password string header false The password to open the presentation.
folder string query false The path to the folder containing the presentation.
storage string query false The name of the storage contaning the folder.

In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.

Examples

Replace every word banana with the word orange on the second slide in the document MyFolder/MyPresentation.pptx. Characters must be case sensitive.

cURL Solution

SDK Solutions

SDKs

Check Available SDKs to learn how to add an SDK to your project.