Vba code to just find red font color text in powerpoint

shoun2502

New Member
Joined
Nov 14, 2018
Messages
43
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Dear Team,

I am using the mentioned vba code to find text in font color red in powerpoint . The below mentioned code i was using to find red color font text in ms word.

Code:
Sub newred()
    Selection.Find.ClearFormatting
    Selection.Find.Font.Color = wdColorRed
    With Selection.Find
        .Text = ""
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute
End Sub

Further, I need to find the red color font text in each slide of my presentation.

I could not get the subroutine to successful run in the powerpoint.

Please help me with that.

Regards
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I have written a subroutine as mentioned below but could not get the desired result

Code:
Sub findred()
    Dim aslide As Slide
    Dim ashape As Shape
    For Each aslide In ActivePresentation.Slides
        For Each ashape In aslide.Shapes
            If ashape.Type = msoTextBox Then
                If ashape.TextFrame2.HasText Then
                    If ashape.TextFrame2.TextRange.Font.Fill.ForeColor.RGB = RGB(255, 0, 0) Then
                    End If
                     End If
                      End If
                              Next ashape
    Next aslide
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,938
Members
448,534
Latest member
benefuexx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top