This topic describes the process to highlight text in PowerPoint using C#. It has the details to set the IDE, a list of steps, and a sample code to develop a presentation highlight tool using C#. You will learn to search a text for highlighting using different options.
Steps to Highlight in PowerPoint using C#
- Set the development environment to use Aspose.Slides for .NET to highlight a text
- Load the PowerPoint presentation and iterate through all the slides
- Iterate through all the shapes in each slide and access each shape in an AutoShape object
- Highlight all the text instances containing the desired word
- Highlight whole words instead of partial one
- Save the output presentation
These steps summarize how to develop a PPTX or PPT highlighter using C#. Load the PowerPoint file into the Presentation object and iterate through all the shapes in each slide. Use the AutoShape object to highlight the text by using various overloaded methods for TextFrame.HighlightText().
Code to Develop PowerPoint Presentation Highlighter using C#
This code demonstrates how to highlight in PowerPoint using C#. If you want to highlight all the strings containing the target string, use the HighlightText() method with the target text and highlight text. To highlight the exactly similar strings to the target string, use other overloaded methods or use HighlightRegex() to search and highlight text using the regex expressions.
This guide has taught us to highlight text in a presentation. If you want to strike out text in a presentation, refer to the article on how to strike out text in PPTX using C#.