Thank you for contacting Syncfusion support.
We can replace the shape’s text in a template PowerPoint presentation using the following ways,
# 1 - By looping through each text part of a paragraph in a shape
For example, if the text is displayed in Microsoft PowerPoint as “Prepared For: <PreparedForName>, <PreparedForEmail>”, the textparts in a paragraph will be separated as follows,
1. TextParts.Text - “Prepared For:”
2. TextParts.Text - “<”
3. TextParts.Text - “PreparedForName”
4. TextParts.Text - “>,<”
5. TextParts.Text - “PreparedForEmail”
6. TextParts[5.Text - “>”
So, you cannot replace the entire text in a single textpart alone. The text can be replaced by iterating through the text part collection of a paragraph in a shape.
# 2 - By using the shape’s title
The shape’s title can be used to identify the textbox placeholders in a PowerPoint presentation. We have modified the provided template presentation by using separate textboxes for the text areas and have mentioned separate title for each textbox whose text has to be replaced with alternate text later. Please refer the screenshot below,
We have created a sample to demonstrate how texts can be replaced by iterating through text part collection of a paragraph and by using shape’s title. You may download the sample from the following link,
Please review the sample and let us know if it could satisfy your requirement.