Search Text in PPT using C++
Use Aspose.Slides for C++ to find text in presentation files without Microsoft PowerPoint.
Search Text in a PPT Presentation via C++
Aspose.Slides for C++ lets you search text in PPT presentations. Use SlideUtil::GetAllTextBoxes to collect the text frames of a slide, then check their text for the required phrase.
Search Text in a PPT Presentation using C++
auto presentation = MakeObject<Presentation>(u"presentation.ppt");
auto slide = presentation->get_Slides()->idx_get(0);
auto textFrames = SlideUtil::GetAllTextBoxes(slide);
for (auto&& textFrame : textFrames)
{
auto text = textFrame->get_Text();
if (text.Contains(u"PowerPoint"))
{
Console::WriteLine(text);
}
}
presentation->Dispose();How to Search Text in PPT via C++
Follow these steps to search text in a PPT presentation.
- Load the PPT file with the
Presentationclass. - Get the required slide from
Presentation::get_Slidesand retrieve its text frames withSlideUtil::GetAllTextBoxes. - Check the text of each frame for the required phrase.
Built with Aspose.Slides
Search Text in PPT Files Online
The free Aspose.Slides Search app is built with Aspose.Slides for C++, the same API as the code above. Open it and see what the API can do with your own PPT files.
- Runs in your browser, nothing to install.
- See how Aspose.Slides finds text before you write code.
- Search your PPT file for plain text or regular expressions.
- Download the matches as a text file.
Other Supported Search Formats
Using C++, you can also search text in the following formats.