Sub main()
Dim RegExp As Object '正規表現オブジェクト
Dim osld As Slide 'スライド
Dim oshp As Shape 'シェイプ
Dim strInput As String '検索対象文字列
Dim b_found As Boolean 'ヒット成否
'正規表現のオブジェクトを生成してパターンをセット
Set RegExp = CreateObject("vbscript.regexp")
With RegExp
.Global = True
.Pattern = "■[^□]□"
End With
'プレゼンテーションの各スライドをループ
For Each osld In ActivePresentation.Slides
'スライド内の各シェイプをループ
For Each oshp In osld.Shapes
'シェイプにテキストフレームがあり
If oshp.HasTextFrame Then
'さらにテキストが含まれている場合
If oshp.TextFrame.HasText Then
'そのテキストを検索対象文字列にセット
strInput = oshp.TextFrame.TextRange.Text
'検索対象文字列にパターンが含まれるかどうか
b_found = RegExp.test(strInput)
'含まれる場合
If b_found = True Then
'★ヒットした部分を範囲選択して色を付けたい!★
End If
End If
End If
Next oshp
Next osld
End Sub