Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The Syncfusion .NET PowerPoint Library (Presentation) allows users to find and replace text in PowerPoint slides and elements, such as shapes, text boxes, tables, and SmartArt, without relying on Microsoft PowerPoint or interop dependencies. It provides options to find text by matching case and whole words.

Find and replace text in PowerPoint using C#

This example code shows how to find and replace text in a presentation using the Syncfusion .NET PowerPoint library with just a few lines of C# code.

using Syncfusion.Presentation;
//Open an existing presentation 
using FileStream inputStream = new FileStream("Template.pptx", FileMode.Open);
using IPresentation pptxDoc = Presentation.Open(inputStream);

//Find all the occurrences of a particular text in the PowerPoint presentation
ITextSelection[] textSelections = pptxDoc.FindAll("product", false, false);
foreach (ITextSelection textSelection in textSelections)
{
    //Get the found text as a single text part
    ITextPart textPart = textSelection.GetAsOneTextPart();
    //Replace the text
    textPart.Text = "Service";
}

//Save the presentation
using FileStream outputStream = new FileStream("Result.pptx", FileMode.Create);
pptxDoc.Save(outputStream);

Key features of find and replace in a PowerPoint presentation

Find text

Find text in a presentation using a specific pattern with regular expressions (regex) or a normal string. Search across the entire presentation or within a specific slide.

Case and whole-word matches

Refine the find operation with match case or whole word for precise results.

Find first

Find only the first occurrence of a specified text in the presentation.

Find and highlight

Find and highlight specific text in a PowerPoint presentation programmatically to make them distinct and easier to review.

Explore, find, and replace references

Check out our blog and knowledge base articles to learn about finding and replacing text in PowerPoint presentations.

How to replace the hyperlink within a SmartArt

Knowledge base

How to replace a particular image with text

Knowledge base

How to replace a particular image with text in a PowerPoint Presentation

Syncfusion .NET PowerPoint Library Resources

Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.

Frequently Asked Questions

Yes, you can customize the find functionality in the .NET PowerPoint Library (Presentation) to search for text based on criteria such as case sensitivity and whole-word matching.

In addition to the usual find and highlight feature, you can format the found text occurrences with options such as bold, underline, font size, and more.

Yes, this .NET PowerPoint library (Presentation) supports finding text inside shapes and tables in a slide.

Yes, you can replace text with presentation slide elements such as images, hyperlinks, and more.

Yes, using the .NET PowerPoint library (Presentation), you can find and replace text in a particular slide.

You can access it through the Syncfusion.Presentation.Net.Core NuGet package. Detailed code samples are available in the documentation, facilitating seamless integration.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion® reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Want to create, View, and edit PPT files in C# or VB.NET?

Start a free 30-day evaluation today!
DOWNLOAD FREE TRIAL

No credit card required.

Mobile Free Evaluation Section

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.

Scroll up icon
OSZAR »