This would be the basis but you might need to adapt it yourself.
Sub chex() Dim osld As Slide Dim newsld As Slide Dim oshp As Shape Dim otr As TextRange Dim b_found As Boolean Dim s As Long Const Findstring As String = "This is me" ' change to suit For Each osld In ActivePresentation.Slides For Each oshp In osld.Shapes If oshp.HasTextFrame Then If oshp.TextFrame.HasText Then Set otr = oshp.TextFrame.TextRange For s = 1 To otr.Sentences.Count If InStr(LCase(otr.Sentences(s)), LCase(Findstring)) > 0 Then b_found = True End If If b_found Then Exit For Next s End If End If If b_found Then Exit For Next oshp If b_found Then Exit For Next osld If b_found Then Set newsld = ActivePresentation.Slides.Add(1, ppLayoutText) newsld.Shapes(1).TextFrame.TextRange = "Sentence Found" newsld.Shapes(2).TextFrame.TextRange = otr.Sentences(s) End If End Sub




Reply With Quote