logo
search
VBA & Macro Problems

How to Find All Bold Text in a PowerPoint Presentation with VBA

Anum MushtaqAnum Mushtaq Oct 22, 2026 868 views

Question details

The user needs to locate every instance of bold formatted text across an entire PowerPoint presentation.

How to Find All Bold Text in a PowerPoint Presentation Using VBA
Product
PowerPoint
Device & OS
not provided
Scenario
Searching for specific text formatting (bold) globally across multiple slides and shapes.
Observed behavior
Because PowerPoint lacks a native 'Find Format' feature for bold text, a VBA macro is required to loop through all slides, shapes, and characters to check their Font.Bold properties.
Before you start

Before running any macros, ensure your presentation is saved in the Macro-Enabled Presentation (.pptm) format to prevent losing your VBA code.

Solution 1Recommended

Use a VBA Macro to Identify Bold Text

Run a custom VBA script that loops through every slide, shape, and text range to check if individual characters have the Font.Bold property set to True.

Since PowerPoint does not have a built-in search tool for text formatting, VBA (Visual Basic for Applications) provides the most effective workaround. By iterating through all shapes that contain text frames, the macro inspects each character individually.

1
Open the VBA Editor

Press the shortcut 'Alt + F11' on your keyboard to open the Microsoft Visual Basic for Applications editor.

2
Insert a New Module

In the top menu of the VBA editor, click 'Insert' and select 'Module'. This will create a blank window for your code.

3
Paste the Macro Code

Copy and paste the following code into the module window: Sub FindBoldText() Dim sld As Slide Dim shp As Shape Dim txt As TextRange Dim i As Long For Each sld In ActivePresentation.Slides For Each shp In sld.Shapes If shp.HasTextFrame Then Set txt = shp.TextFrame.TextRange For i = 1 To txt.Characters.Count If txt.Characters(i, 1).Font.Bold Then MsgBox "Found bold text: " & txt.Characters(i, 1).Text & " on slide " & sld.SlideIndex & ", shape " & shp.Name End If Next i End If Next shp Next sld End Sub

4
Run the Macro

Click anywhere inside the pasted code and press 'F5', or click the 'Run' button (the green play arrow) in the toolbar. A message box will pop up for each bold character found, detailing its text, slide number, and shape name.

Use a VBA Macro to Identify Bold Text
Modifying the Macro: If you have a large presentation with extensively bolded text, displaying a message box for every single character can be overwhelming. You can modify the code to output the results to the 'Immediate Window' using Debug.Print instead of MsgBox.
Advanced Presentation Editing

Run Macros Seamlessly with WPS Presentation

WPS Office offers robust support for VBA macros, allowing you to easily automate tasks and run custom scripts—like finding bold text—just as you would in Microsoft PowerPoint.

  1. 1. Open WPS Presentation: Launch WPS Office and open your presentation file.
  2. 2. Access the Developer Tools: Navigate to the 'Tools' tab on the ribbon and click on 'Developer' to access macro features.
  3. 3. Open the VBA Editor: Click 'VB Editor' to launch the coding environment where you can manage your scripts.
  4. 4. Run Your Code: Insert a new module, paste your FindBoldText VBA code, and run it to instantly locate your formatted text.
Fully compatible with Microsoft PowerPoint formats (.pptx, .pptm)Built-in VBA editor for creating and running advanced macrosLightweight software with a highly intuitive user interfaceSeamless migration of your existing macro-enabled files
microsoft office alternative - wps office

Frequently Asked Questions

Can I use this VBA macro to find italic or underlined text?

Yes. You can easily modify the provided VBA code by changing the condition. Replace 'Font.Bold' with 'Font.Italic' to find italicized text, or 'Font.Underline' to locate underlined text.

Why is the macro skipping bold text inside grouped shapes?

The standard loop only checks top-level shapes. To find text within grouped shapes, the VBA code requires an additional nested loop to iterate through the 'Shape.GroupItems' collection.

Does PowerPoint have a built-in feature to find formatting?

Unlike Microsoft Word, which has an advanced 'Find and Replace' tool for specific formatting styles, PowerPoint does not offer a native feature to search globally for text formats like bold or italics. Utilizing a VBA macro is the standard workaround.