A wonderfully useful thread! Thanks!
Notes sometimes need wildcard search and replace. A wildcard search and replace (using regular expression notation) in the Notes Pane, instead of the slide, in PowerPoint needs a slightly modified approach compared to the above code from John Wilson.
Below is Visual Basic code for modifying within the Notes Pane (or notes panel). The code changes a comma to a decimal point between number strings, as is needed when converting European notation 234,56 to UK/US notation 234.56. The code is modified from PPTAlchemy page PowerPoint_RegEx.html. You can find the page with a Google search of "Regular Expressions in PowerPoint" with PPTAlchemy.
An important modification is to access the Notes Pane instead of the slide with ActivePresentation.Slides(intSlide).NotesPage, where intSlide is the integer number of the slide, instead of using ActivePresentation.Slides. A loop is added to sequentially process the slides from 1 to ActivePresentation.Slides.Count.
The Visual Basic code can be modified for other strings as needed. For example, modifying
.Pattern = "(\d)\,(\d)"
to
.Pattern = "(##)(.+)(##)"
identifies arbitrary strings for changing in all Notes Panes in the PowerPoint file when the strings are placed between a beginning "##" and an ending "##" as in
##This string is identified for changing.##
Sub use_regex_decimal_point()Dim regX As Object
Dim osld As Slide
Dim oshp As Shape
Dim intSlide As Integer
Dim strInput As String
Dim b_found As Boolean
Dim iRow As Integer
Dim iCol As Integer
Set regX = CreateObject("vbscript.regexp")
With regX
.Global = True
.Pattern = "(\d)\,(\d)"
End With
For intSlide = 1 To ActivePresentation.Slides.Count
For Each osld In ActivePresentation.Slides(intSlide).NotesPage
For Each oshp In osld.Shapes
If oshp.HasTable Then
For iRow = 1 To oshp.Table.Rows.Count
For iCol = 1 To oshp.Table.Columns.Count
strInput = oshp.Table.Cell(iRow, iCol).Shape.TextFrame.TextRange.Text
b_found = regX.Test(strInput)
If b_found = True Then
strInput = regX.Replace(strInput, "$1.$2")
oshp.Table.Cell(iRow, iCol).Shape.TextFrame.TextRange = strInput
End If
Next iCol
Next iRow
Else
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
strInput = oshp.TextFrame.TextRange.Text
b_found = regX.Test(strInput)
If b_found = True Then
strInput = regX.Replace(strInput, "$1.$2")
oshp.TextFrame.TextRange = strInput
End If
End If
End If
End If
Next oshp
Next osld
Next intSlide
Set regX = Nothing
End Sub